Using jQuery noConflict() with script.aculo.us

前端 未结 4 1720
萌比男神i
萌比男神i 2021-01-16 08:12

I have a site using a \"widget\" (from http://healcode.com) that includes the script.aculo.us JavaScript library. The problem is that the site I\'m building is on WordPress,

4条回答
  •  时光取名叫无心
    2021-01-16 08:28

    I found the solution VERY surprising!

    First of all, using the $j = jQuery.noConflict(); mode did not work.

    Second, calling jQuery.noConflict(); at the head did not work.

    The method that did work was this one: http://codeimpossible.com/2010/01/13/solving-document-ready-is-not-a-function-and-other-problems/

    Oddly, the Coda Slider 2.0 plugin does not automatically do noConflict so it turned out that IN ADDITION to the problems listed above, I needed to wrap that plugin in .noConflict(); as well. Shout out the the author of the blog post, not sure why other noConflict(); calling methods didn't work, but I'm glad I found the post.

提交回复
热议问题