Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions js/jquery.material.form.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,12 @@ $(function(){
// Inputs
this.find('input, textarea').each(function(i){
if(isValidType($(this))){
var name = $(this).attr('name');
$(this).attr('id', name);
if($(this).attr('id') == '') {
name = $(this).attr('name');
$(this).attr('id', name);
}else{
name = $(this).attr('id');
}
var $wrap = $(this).wrap("<div class='material-input'></div>").parent();
$wrap.append("<span class='material-bar'></span>");

Expand Down Expand Up @@ -177,4 +181,4 @@ $(function(){
});

};
});
});