Mr.Shawn Posted February 2, 2008 Share Posted February 2, 2008 <script type="text/javascript" src="js/jquery.js"></script> <script type="text/javascript" src="js/jquery.curvycorners.packed.js"></script> <script type="text/javascript" src="/js/mootools.js"></script> <script type="text/javascript" src="/js/moodalbox.js"></script> Hi, everyone. I uses the curvy-corners to cast rounded corners on a certain div. Problem happens when I tried to load the modalbox js and the rounded corners is gone. Seems like the both javascript is clashing with each other and there's no way I could edit them. Their codes are bunched together without even indenting or spacing. How can I solve this situation? Link to comment https://forums.phpfreaks.com/topic/89042-javascript-clashes/ Share on other sites More sharing options...
phpQuestioner Posted February 2, 2008 Share Posted February 2, 2008 View the code; look for specific parts of the script that changes css styles. If you can correct and save the css style issue, that the external js cause, do so as needed. Otherwise, add inline css as needed to the html elements; too override js code. Link to comment https://forums.phpfreaks.com/topic/89042-javascript-clashes/#findComment-456362 Share on other sites More sharing options...
emehrkay Posted February 3, 2008 Share Posted February 3, 2008 jquery allows you to create a namespace for the whole library, I dont know how though. Mootools doesnt work with other libraries - that's their stance. Link to comment https://forums.phpfreaks.com/topic/89042-javascript-clashes/#findComment-456424 Share on other sites More sharing options...
Mr.Shawn Posted February 3, 2008 Author Share Posted February 3, 2008 http://docs.jquery.com/Using_jQuery_with_Other_Libraries the above link i had read is something that helps to fix the clashing. but it is still not working although i replace the $ to the variable that you declared to be jQuery.noConflict(); Link to comment https://forums.phpfreaks.com/topic/89042-javascript-clashes/#findComment-456480 Share on other sites More sharing options...
emehrkay Posted February 3, 2008 Share Posted February 3, 2008 why not find solutions for each library and use just one? Here is a rounded corners for mootools - http://www.phatfusion.net/roundedcorners/ Here is a lightbox for jquery - http://15daysofjquery.com/jquery-lightbox/19/ Link to comment https://forums.phpfreaks.com/topic/89042-javascript-clashes/#findComment-456708 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.