javascript - Jquery - get selector when using after -
i have code:
$('#.element').on('click', function(e) { $(this).after('<div>...</div>'); });
and want other stuff created div
in same line of code without using id
. how can that?
i mean this:
$(this).after('<div>...</div>').css('border', '1px').fadeout('5000');
this above code set border
, fadeout
element $(this)
, want done new created div
element.
this why .insertafter()
have been introduced, return objects in reverse manner.
$('<div>...</div>').css('border', '1px').insertafter($(this)).fadeout('5000');
Comments
Post a Comment