jQuery.noConflict() examples Nguồn http://jquerynoconflict.discoverproductivity.co.uk/noconflict.html

Script gốc:

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.5.2 /jquery.min.js"></script>

<script type='text/javascript'>

$(window).load(function(){
$(document).ready(function(){
      $('#imgSmile').width(200);
      $('#imgSmile').mouseover(function()
      {
         $(this).css("cursor","pointer");
         $(this).animate({width: "500px"}, 'slow');
      });
   $('#imgSmile').mouseout(function()
     {   
         $(this).animate({width: "200px"}, 'slow');
      });
  });
});  
</script>

Script chỉnh sửa:
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.5.2 /jquery.min.js"></script>

<script type='text/javascript'>
var $j = jQuery.noConflict();
$j(window).load(function(){
$j(document).ready(function(){
      $j('#imgSmile').width(200);
      $j('#imgSmile').mouseover(function()
      {
         $j(this).css("cursor","pointer");
         $j(this).animate({width: "500px"}, 'slow');
      });
   $j('#imgSmile').mouseout(function()
     {   
         $j(this).animate({width: "200px"}, 'slow');
      });
  });
});  
</script>

Nhận xét

Bài đăng phổ biến từ blog này

Khôi phục phân vùng ổ cứng do ghost nhầm theo Hieuit.net

Cách sử dụng 2 phương thức [httppost] và [httpget] trong MVC theo https://dzungdt.wordpress.com

MVC định dạng tiền tệ vnđ - Format currency vnd in MVC