var form='forma';
var data_string=$('form[name='+form+']').serialize();
console.log(data_string);
5 lis 2013
var form='forma';
var data_string=$('form[name='+form+']').serialize();
console.log(data_string);
Wyświetlenie okienka ładowania na środku ekranu:
var winH = $(window).height();
var winW = $(window).width();
var loading = $('#loading');
var maxheight = loading.css("max-height");
var maxwidth = loading.css("max-width");
var loading_height = loading.height();
var loading_width = loading.width();
if (maxheight != "none") {
loading_height = Number(maxheight.replace("px", ""));
}
if (maxwidth != "none") {
loading_width = Number(maxwidth.replace("px", ""));
}
loading.css('top', winH / 2 + $(window).scrollTop() - loading_height / 2);
loading.css('left', winW / 2 - loading_width / 2);
$('#loading').show();
Szukanie właściwości elementu findem
<div>
<ul>
<li>a</li>
<li>b</li>
<li>c</li>
<li>d</li>
</ul>
</div>
$('.contener').find('.niecos').css({'border':'1px solid red'});
jQuery('#table input[type=radio]').click(function () {
jQuery('#table input[type=button]').attr('disabled', 'disabled');
let id = jQuery(this).attr('id');
let id_btn = 'b' + id.substring(1, 5);
jQuery('#' + id_btn).removeAttr('disabled');
});
<div id="table">
<input id="k1" type="radio"><input id="b1" disabled="disabled">
<input id="k2" type="radio"><input id="b2" disabled="disabled">
<input id="k1" type="radio"><input id="b3" disabled="disabled">
</div>
$('.menu_e[attr_row=1] a').text()
<td attr_row="1"><a onclick="return false;">mapa</a></td>