Multiple jQuery.noConflict() instances...
Posted
by user353816
on Stack Overflow
See other posts from Stack Overflow
or by user353816
Published on 2010-05-30T00:41:16Z
Indexed on
2010/05/30
0:52 UTC
Read the original article
Hit count: 259
I am working with several jQuery scripts that include a MenuFader (http://css-tricks.com/examples/MenuFader/), twitter feed, and timestamp. Additionally I have a couple Mootools scripts that include the Barackslideshow (http://devthought.com/wp-content/moogets/BarackSlideshow/demo.html). And finally I have a scrolling ticker with tooltips taken from the twitter homepage.
I originally had a conflict with the Jquery MenuFader and Mootools BarackSlideshow, but easily fixed this issue with the jQuery.noconflict(); and replaced all corresponding $ with jQuery.
Unfortunately, after I added the scrolling ticker from Twitter, the Mootools BarackSlideshow and the Jquery MenuFader no longer work.
I tried to implement jQuery.noconflict(); then $.noconflict(); then var j = jQuery.noconflict(); and replacing the $ as I did previously, but I cannot get the scripts to play nicely.
Any help is greatly appreciated...I have been working on this all day. I am pretty new with javascript, but have managed to get through most problems with a little persistence. Please take a look at the script below:
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.0/jquery.min.js" type="text/javascript"></script>
<script src="http://a2.twimg.com/a/1274914417/javascripts/fronts.js" type="text/javascript"></script>
<script type="text/javascript">
//<![CDATA[
$( function () {
setTimeout(function() { $(".twtr-widget").append($("<div></div>").attr("class", "twtr-fade")); }, 0);
(function() {
var tabIndex = $("[tabindex]:last").attr("tabIndex");
var setTabIndex = function() {
$(this).attr("tabindex", ++tabIndex);
}
$(".footer-nav a").each(setTabIndex);
$(".language-select a").each(setTabIndex);
})();
$("#signup_submit").scribe({
event_name: "signup_submit_click",
experiment: "ab_signup_button",
bucket: "sign_up"
}, "www_ab_tests");
$('#signin_menu').isSigninMenu();
new FrontPage().init();
});
//]]>
© Stack Overflow or respective owner