jQuery

jquery snippet to check checkboxes on hover

I just run this on firebug and it saves me a lot of time when there's a lot of checkboxes I have to check ( admin/user/permissions after enabling content permissions, for example )

$('input').hover(function() {
  $(this).attr('checked', true);
}, function(){ });

jQuery .serialize() returns empty string

In case anyone else runs into this:

I kept hitting my head, wondering why jQuery's serialize() would return an empty string for my form.

The reason was that I hadn't specified name attributes ( I was only using IDs ) for form elements, as I was dealing with the form via AJAX and hadn't had a reason to need them.

Simple fix, annoying to find

Syndicate content