We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
$node.addClass('active'); $node.removeClass('active');
$node.show(); $node.hide();
//获取 $node.attr('id'); $node.attr('src'); $node.attr('title'); //修改 $node.attr('id','aa'); $node.attr('src','http://xxxx'); $node.attr('title','bbb');
$node.data('src','http://xxxx');
$ct.prepend($node);
$ct.append($node);
$node.remove()
$ct.empty();
$ct.html('<div class="btn"></div>')
//不包含内边距 $node.height() $node.width() //包括内边距 $node.innerHeight() $node.innerWidth() //包括边框 $node.outerHeight() $node.outerWidth() //包括外边距 $node.outerHeight(true) $node.outerWidth(true)
$(document).scrollTop();
$node.offset()
$node.css({ color:'red', fontSize:'14px' })
$('li').each(function(){ $(this).text($(this).text()+$(this).text()); })
$ct.find('.item');
$ct.children()
$node.parents('.ct').find('.panel')
$('div').length
$("div").click(function () { var index = $("div").index(this); });
$btn = $('#button'); $btn.on('click',function(){ $btn.css('background','blue') });
实现
$(document).on('scroll',function(){ var n = $(document).scrollTop(); console.log(n); });
var $div = $('div'); $div.on('mouseover',function(){ $(this).css('background','red'); }); $div.on('mouseleave',function(){ $(this).css('background','#fff'); });
var $input = $('input'); $input.on('focusin',function(){ $(this).css('border','1px solid blue'); }); $input.on('focusout',function(){ $(this).css('border',''); console.log($(this).val()); }) $input.on('keydown change',function(){ var value = $(this).val().toUpperCase(); $(this).val(value); })
var $select= $('#select'); $select.on('change',function(){ console.log($(this).val()); });
The text was updated successfully, but these errors were encountered:
No branches or pull requests
用jQuery实现以下操作
实现
实现
实现
实现
实现
The text was updated successfully, but these errors were encountered: