Magento Forum

   
Page 2 of 2
Defer Javascript loading in magento
 
Siggit
Jr. Member
 
Total Posts:  18
Joined:  2010-06-21
 

Hi!

it loads the jquery at first, but im activated it and the Dropdown is deactivated.
2columns-left.html

<head>
 <
script type="text/javascript" src="/js/jquery/jquery-1.10.2.min.js"></script>
<?php 
echo $this->getChildHtml('head'?>

</head>

in the jqurey-1.10.2.min.js alt last Line.

jQuery.noConflict();

Result Source Code:

<head>
 <
script type="text/javascript" src="/js/jquery/jquery-1.10.2.min.js"></script>
 
<script>
 
jQuery.noConflict();
</script>

2. Solution (dont work)

page.xml

<default translate="label" module="page">
        <
label>All Pages</label>
        <
block type="page/html" name="root" output="toHtml" template="page/2columns-left.phtml">
            <
block type="page/html_head" name="head" as="head">
...
<
action method="addJs"><script>jquery/jquery-1.10.2.min.js</script></action>
<
action method="addJs"><script>varien/menu.js</script></action>
...

jquery/jquery-1.10.2.min.js exists

Source Code without jquery-1.10.2.min.js (for instance also <action method="addJs"><script>http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js</script></action>) why dont load jquery over page.xml?

Siggit

goivvy - 31 July 2013 04:38 AM

make sure [your magento root]/js/jquery/jquery-1.10.2.min.js file exists

also add

jQuery.noConflict();

to the end of jquery lib file - that would make it play nicely with prototype

we offer paid support it you woudn’t find a solution http://goivvy.com/magento-services/magento-service.html

 
Magento Community Magento Community
Magento Community
Magento Community
 
Siggit
Jr. Member
 
Total Posts:  18
Joined:  2010-06-21
 

Hi!

it doesnt work so.

Test it at your Demoshop please, and send me the Link.

Siggit

goivvy - 31 July 2013 04:38 AM

make sure [your magento root]/js/jquery/jquery-1.10.2.min.js file exists

also add

jQuery.noConflict();

to the end of jquery lib file - that would make it play nicely with prototype

we offer paid support it you woudn’t find a solution http://goivvy.com/magento-services/magento-service.html

 
Magento Community Magento Community
Magento Community
Magento Community
 
tzvimoshe
Jr. Member
 
Total Posts:  2
Joined:  2012-01-16
 

Attn: Goivvy
The link to extension is no longer working http://www.goivvy.com/extensions/GoIvvy_DeferJS-1.0.0.0.tgz
Is there an update ? I would like to try this on a few stores..
Thanks !

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
    Back to top
Page 2 of 2