Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Trying to include some jQuery [HELP PLZ]
 
Giorgi
Member
 
Total Posts:  53
Joined:  2007-10-21
 

Hello, So I am trying to implement this:

http://www.gcmingati.net/wordpress/wp-content/lab/jquery/imagestrip/imageslide-plugin.html

on my front page.

1. So I went and included some JS on page.xml:

<action method="addJs"><script>jq/jquery-1.2.6.min.js</script></action>
<
action method="addJs"><script>jq/jquery.slideviewer.1.1.js</script></action>
<
action method="addJs"><script>jq/jquery.easing.1.2.js</script></action>
<
action method="addJs"><script>jq/jquery.tooltip.min.js</script></action>

2. and some CSS:

<action method="addCss"><stylesheet>css/jquery.tooltip.css</stylesheet></action>
<
action method="addCss"><stylesheet>css/slideshow.css</stylesheet></action>

3. then I need to activate it, I am trying to do like these in head.phtml:

<script type="text/javascript">     
   var 
$j jQuery.noConflict(); 
   $(
window).bind("load", function() {     
   
$("div#mygalone").slideView() 
}); 
</script>

4. I am trying to implement it on my frontpage, via CMS:

<div id="mygalone" class="svw">
    <
ul>
        <
li><img alt="abc defrg thysu ooip jkifbtg fff" src="skin/frontend/default/default/images/slides/step1.jpg" /></li>
        <
li><img alt="abc defrg thysu ooip jkifbtg fff" src="skin/frontend/default/default/images/slides/step2.jpg" /></li>
        <
li><img alt="abc defrg thysu ooip jkifbtg fff" src="skin/frontend/default/default/images/slides/step3.jpg" /></li>
        
    </
ul>
</
div>

It does not give any errors but does not work either… what I am doing wrong?

Tnx

 
Magento Community Magento Community
Magento Community
Magento Community
 
laurent
Member
 
Total Posts:  75
Joined:  2007-08-31
Paris, France
 

@see http://docs.jquery.com/Using_jQuery_with_Other_Libraries

var $j jQuery.noConflict();
$j(document).ready(function(){
      $j
("div#mygalone").slideView();
});
 
Magento Community Magento Community
Magento Community
Magento Community
 
Giorgi
Member
 
Total Posts:  53
Joined:  2007-10-21
 
laurent - 11 June 2008 06:22 AM

@see http://docs.jquery.com/Using_jQuery_with_Other_Libraries

var $j jQuery.noConflict();
$j(document).ready(function(){
      $j
("div#mygalone").slideView();
});

Tnx man, but it’s giving me error now:

Line7841
Char
2299
Error
'this.parentNode' is null or not an object
Code
0
URL
myurl
 
Magento Community Magento Community
Magento Community
Magento Community
 
rrbaker
Jr. Member
 
Total Posts:  3
Joined:  2008-06-17
 

One other thing; in addition to adding NoConflict() with jQuery v1.2.6, I also had to upgrade prototype and scriptaculous to v1.8.1 per this other message I found:

http://tinyurl.com/5uh5jw

It seems older versions of Scriptaculous override the call() function, which throws jQuery despite adding NoConflict().  After the upgrade, my jQuery was working fine again, and so far no problems with Magento (although I have to say I haven’t tested it thoroughly).  Note that you’ll have to upgrade all the files in the /js/scriptaculous folder, especially effects.js, not just scriptaculous.js.

Hope it helps!

 
Magento Community Magento Community
Magento Community
Magento Community
 
Prashant Dongare
Jr. Member
 
Avatar
Total Posts:  5
Joined:  2008-10-24
 

Thanks, laurent
Its working perfectly.... smile

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top