I have form in my ASP.NET masterPage.master and if i click on submit it call some method from masterPage.master.cs file by ajax (i have it in update panel). But i want improve i
I like to create the element this way:
$('',{
id: 'idhere',
css:{
width: $('#formBox').width(),
height: $('#formBox').height()
}
});
etc...
For reference - some attributes have reserved words/names (see MDN Reserved Words), so if you wanted to specify a class you need to wrap the attribute name:
$('',{
id: 'idhere',
'class':'myclassname',
css:{
width: $('#formBox').width(),
height: $('#formBox').height()
}
});
You can of course assign a name to this new element and change it as you go along...
var div = $('',{
id: 'idhere',
'class':'myclassname',
css:{
width: $('#formBox').width(),
height: $('#formBox').height()
}
});
$(div).prop('name','saymyname');