Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on May 7th, 2012  |  syntax: None  |  size: 0.80 KB  |  hits: 15  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. MVC3 not executing JQuery on partial updates
  2. $(document).ready(function () {
  3.         $(".thumb").click(function () {
  4.             $("#full").attr("src", $(this).data('main'));
  5.         });
  6.     });
  7.        
  8. <a data-ajax="true" data-ajax-method="Get" data-ajax-mode="replace" data-ajax-update="#product-details-page" href="/Catalog/ProductGroupGrid?categoryId=2&selectedProductId=561"><img alt="Category" src="/images/catalog/thumb/test.jpg" /></a>
  9.                                 </span>
  10.        
  11. $(document).ready(function () {
  12.     $(document).on('click', '.thumb', function () {
  13.         $("#full").attr("src", $(this).data('main'));
  14.     });
  15. });
  16.        
  17. $(function() {
  18.     $(document).on('click', '.thumb', function() { // rest is same });
  19. });
  20.        
  21. $(function() {
  22.     $('.thumb').live('click', function() { // rest is same });
  23. });