Sunday, May 22, 2011

jQuery มัน Confilct กัน แก้ยังไงดี

This technique is especially effective in conjunction with the .ready() method's ability to alias the jQuery object, as within callback passed to .ready() we can use $ if we wish without fear of conflicts later:


$.noConflict();
jQuery(document).ready(function($) {
// Code that uses
jQuery's $ can follow here.
});
// Code that uses other library's $ can
follow here.


Link : http://api.jquery.com/jQuery.noConflict/

No comments: