javascript - Using this with pseudo selectors jquery -


i'd know if there way use this css pseudo selectors - (aka nested elements) in jquery. here's might like.

    $('#element').click(function(){         $(this' .nested').css('height','100px');     }); 

but isn't how syntax works. i'd know how work.

use find() instead. example:

$('#element').click(function(){     $(this).find('.nested').css('height','100px'); }); 

Comments

Popular posts from this blog

javascript - ScrollTo Effect (href to div) -

javascript - ng-class not responding to change in model in Angular? -

javascript - document.registerElement extending HTMLInputElement prototype while using custom tag name to avoid implicit browser style -