change attr to prop
This commit is contained in:
		
							parent
							
								
									4435d957fc
								
							
						
					
					
						commit
						3c2a0de89d
					
				
					 1 changed files with 5 additions and 5 deletions
				
			
		|  | @ -62,13 +62,13 @@ | ||||||
|                 var options = $.extend({}, $.fn.actions.defaults, opts); |                 var options = $.extend({}, $.fn.actions.defaults, opts); | ||||||
|                 var actionCheckboxes = $(this); |                 var actionCheckboxes = $(this); | ||||||
|                 checker = function(checked) { |                 checker = function(checked) { | ||||||
|                     $(actionCheckboxes).attr("checked", checked) |                     $(actionCheckboxes).prop("checked", checked) | ||||||
|                         .parent().parent().toggleClass(options.selectedClass, checked); |                         .parent().parent().toggleClass(options.selectedClass, checked); | ||||||
|                 } |                 } | ||||||
|                 updateCounter = function() { |                 updateCounter = function() { | ||||||
|                     var sel = $(actionCheckboxes).filter(":checked").length; |                     var sel = $(actionCheckboxes).filter(":checked").length; | ||||||
|                     $(options.counterContainer).html(sel); |                     $(options.counterContainer).html(sel); | ||||||
|                     $(options.allToggle).attr("checked", function() { |                     $(options.allToggle).prop("checked", function() { | ||||||
|                         if (sel == actionCheckboxes.length) { |                         if (sel == actionCheckboxes.length) { | ||||||
|                             value = true; |                             value = true; | ||||||
|                         } else { |                         } else { | ||||||
|  | @ -83,7 +83,7 @@ | ||||||
|                     updateCounter(); |                     updateCounter(); | ||||||
|                 }); |                 }); | ||||||
|                 $(options.allToggle).click(function() { |                 $(options.allToggle).click(function() { | ||||||
|                     checker($(this).attr("checked")); |                     checker($(this).prop("checked")); | ||||||
|                     updateCounter(); |                     updateCounter(); | ||||||
|                 }); |                 }); | ||||||
|                 lastChecked = null; |                 lastChecked = null; | ||||||
|  | @ -92,14 +92,14 @@ | ||||||
|                     var target = event.target ? event.target : event.srcElement; |                     var target = event.target ? event.target : event.srcElement; | ||||||
|                     if (lastChecked && $.data(lastChecked) != $.data(target) && event.shiftKey == true) { |                     if (lastChecked && $.data(lastChecked) != $.data(target) && event.shiftKey == true) { | ||||||
|                         var inrange = false; |                         var inrange = false; | ||||||
|                         $(lastChecked).attr("checked", target.checked) |                         $(lastChecked).prop("checked", target.checked) | ||||||
|                             .parent().parent().toggleClass(options.selectedClass, target.checked); |                             .parent().parent().toggleClass(options.selectedClass, target.checked); | ||||||
|                         $(actionCheckboxes).each(function() { |                         $(actionCheckboxes).each(function() { | ||||||
|                             if ($.data(this) == $.data(lastChecked) || $.data(this) == $.data(target)) { |                             if ($.data(this) == $.data(lastChecked) || $.data(this) == $.data(target)) { | ||||||
|                                 inrange = (inrange) ? false : true; |                                 inrange = (inrange) ? false : true; | ||||||
|                             } |                             } | ||||||
|                             if (inrange) { |                             if (inrange) { | ||||||
|                                 $(this).attr("checked", target.checked) |                                 $(this).prop("checked", target.checked) | ||||||
|                                     .parent().parent().toggleClass(options.selectedClass, target.checked); |                                     .parent().parent().toggleClass(options.selectedClass, target.checked); | ||||||
|                             } |                             } | ||||||
|                         }); |                         }); | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		
		Reference in a new issue
	
	 Luke Hatcher
						Luke Hatcher