Skip to content
This repository has been archived by the owner on Aug 31, 2022. It is now read-only.

Commit

Permalink
Merge pull request #5 from felipedeboni/master
Browse files Browse the repository at this point in the history
Quick fix for tag attributes that contains an array. CakePHP, Rails and others...
  • Loading branch information
scottjehl committed Mar 6, 2013
2 parents c11f5d6 + dadb26f commit d2b72e1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions js/jQuery.customInput.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jQuery.fn.customInput = function(){
var input = $(this);

// get the associated label using the input's id
var label = $('label[for='+input.attr('id')+']');
var label = $('label[for="'+input.attr('id')+'"]');

// wrap the input + label in a div
input.add(label).wrapAll('<div class="custom-'+ input.attr('type') +'"></div>');
Expand All @@ -29,7 +29,7 @@ jQuery.fn.customInput = function(){
})
.trigger('updateState')
.click(function(){
$('input[name='+ $(this).attr('name') +']').trigger('updateState');
$('input[name="'+ $(this).attr('name') +'"]').trigger('updateState');
})
.focus(function(){
label.addClass('focus');
Expand Down

0 comments on commit d2b72e1

Please sign in to comment.