Jscript Conflicts - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: Jscript Conflicts (/showthread.php?tid=54623) |
Jscript Conflicts - El Forum - 09-17-2012 [eluser]Shiju S S[/eluser] I have loaded the following j$cripts for a slider, autocomplete, date picker and password strength. My slider and date picker is not working after loading the autocomplete $cripts. Slider: Code: <$script language="javascript" type="text/javascript" src="<?Php echo base_url()?>assets/slider/jquery.easing.js"><$script> Clash with Code: <$cript type="text/javascript" src="<?Php echo base_url()?>autocomplete/jquery-1.7.1.min.js"><$cript> The date picker has Code: <?Php echo link_tag('assets/ui-lightness/jquery-ui-1.8.20.custom.css'); ?> Jscript Conflicts - El Forum - 09-17-2012 [eluser]pickupman[/eluser] If you are already using jQueryUI, why not just use the auto complete widget already included. And by clashing,what error are you actually getting? Also it looks your scripts are jQuery why the noConflict? Jscript Conflicts - El Forum - 09-18-2012 [eluser]Shiju S S[/eluser] The noconflict function in the code below is not allowing other functions to work: That is all I know. Code: <$cript type="text/javascript" charset="utf-8"> Password strength checker function is Code: <$cript type="text/javascript"> Code: <$cript type="text/javascript"> Jscript Conflicts - El Forum - 09-18-2012 [eluser]pickupman[/eluser] I've always preferred to use this method for noConflict Code: jQuery(document).ready(function($){ All references inside the ready() function will get passed the jQuery object allowing it to work with out conflict. Jscript Conflicts - El Forum - 09-18-2012 [eluser]CroNiX[/eluser] If you use no-conflict mode, then all of your plugins also must be written to be able to use it. If not, then they can't access jQuery, unless they used jQuery().method instead of $().method, but most use the shorthand version ($). Jscript Conflicts - El Forum - 09-18-2012 [eluser]Shiju S S[/eluser] I have no knowledge in jquery functions. Can you please help me to remove this no conflict and redefine it using ready function as you have explained. Code: <$cript type="text/javascript" charset="utf-8"> Jscript Conflicts - El Forum - 09-18-2012 [eluser]pickupman[/eluser] I believe I already gave you the example of what to use. See my post from above. Just use the script block I posted above and put your jquery code inside of it. You can also remove the noConflict line from the code as well. Jscript Conflicts - El Forum - 09-18-2012 [eluser]Shiju S S[/eluser] Thank you sir, I got it done by replacing $j( with $( and removing the var $j = jQuery.noConflict1(); That was all I knew. Any how it works. |