Jump to content


Photo
- - - - -

jQuery conflict


Best Answer Simon_P , 16 March 2013 - 11:26 AM

WordPress runs jQuery in compatible mode, so $ MUST be substituted with jQuery

 

$('html, body').stop().animate({

 

becomes

 

jQuery('html, body').stop().animate({

 

and so forth. Good luck.

Go to the full post


  • Please log in to reply
4 replies to this topic

#1 festoon

festoon

    Member

  • Members

  • 17 posts
  • Country: Country Flag

Posted 16 March 2013 - 10:54 AM

I'm experiencing a conflict when loading

Please Login or Register to see this Hidden Content

I'm loading the script through Pagelines > Site Options > Header Scripts. 

 

When this script is loaded the Quickslider and background image disappears from my page.

 

Can someone please help?

 

Thanks.

 



#2 Simon_P

Simon_P

    Messer

  • Administrators



  • 8388607 posts
  • LocationDevon
  • Framework Version:2.1.1
  • Country: Country Flag

Posted 16 March 2013 - 11:17 AM

Why on earth are you loading jquery, when its already loaded by wordpress anyway?



#3 festoon

festoon

    Member

  • Members

  • 17 posts
  • Country: Country Flag

Posted 16 March 2013 - 11:23 AM

I'm trying to add this - 

Please Login or Register to see this Hidden Content

 

It doesn't seem to work unless that script is loaded.



#4 Simon_P

Simon_P

    Messer

  • Administrators



  • 8388607 posts
  • LocationDevon
  • Framework Version:2.1.1
  • Country: Country Flag

Posted 16 March 2013 - 11:26 AM   Best Answer

WordPress runs jQuery in compatible mode, so $ MUST be substituted with jQuery

 

$('html, body').stop().animate({

 

becomes

 

jQuery('html, body').stop().animate({

 

and so forth. Good luck.



#5 festoon

festoon

    Member

  • Members

  • 17 posts
  • Country: Country Flag

Posted 16 March 2013 - 11:30 AM

Thanks Simon. All fixed!