October 10, 201214 yr Hello Everyone, I am adding 2 effects in one page, say, header transition and scroller in footer. But only one is working at a time. here is the link: http://www.rajanskumar.com/jsclash/header.html In this link, scroller is working. but if i move the <script type="text/javascript" src="js/slide.js"></script> above <script type="text/javascript" src="js/jquery-1.6.3.min.js"></script> then scroller stops working and header starts working. Not getting whats the problem. Any Help..!
October 10, 201214 yr Hi, You have to make some changes into JS Slide.js Remove all old code and replace with below code. $(function() { $(".slider_container").jCarouselLite({ btnNext: ".arrow_right", btnPrev: ".arrow_left", visible: 2, speed :1000, auto : 10 }); }); Hope this will works Edited October 10, 201214 yr by Hem
October 10, 201214 yr jQuery MUST be loaded before any other jquery plugins, since slider uses jquery, slide.js must be below jquery . as for your error, everything works good if you do this, open header.js and add this to the top : var $ = jQuery.noConflict(); another method is to open header.js and replace $ with jQuery . both methods works, but I would go with the second one. also don't try using the code Hem mentioned, he has missed something. @hem, the code you have given is inside this file , hence there is no need to add it ! Edited October 10, 201214 yr by Danny87
October 11, 201214 yr jQuery MUST be loaded before any other jquery plugins, since slider uses jquery, slide.js must be below jquery . as for your error, everything works good if you do this, open header.js and add this to the top : var $ = jQuery.noConflict(); another method is to open header.js and replace $ with jQuery . both methods works, but I would go with the second one. also don't try using the code Hem mentioned, he has missed something. @hem, the code you have given is inside this file , hence there is no need to add it ! Yes I'm agree with you Danny but I've replaced $ to avoid jQuery Conflict. What I missed? Can you tell me? I've run this code in my local PC. It's working fine from my side. Edited October 11, 201214 yr by Hem
October 12, 201214 yr Author @Hem, your code is working fine..thnx a lot... @Danny, your both methods are working fine...thnx a lot..........
October 12, 201214 yr Welcome. Rajanskumar, Could you please edit your first thread & Marked as [sOLVED].
Create an account or sign in to comment