I’m trying to do this:
$('.summary').css('top',$(this).outerHeight());
Where I reference ‘this’ I would like to reference the instance of $(‘.summary’) that jquery is currently talking to, since there are multiple, but the scope considers ‘this’ the page in this instance.
What’s the easiest way to reference each element in this case?
I looked through the search for the answer for this, but don’t quite know the right phrasing. If this has been answered let me know and I can close as a duplicate.
Thanks!
You can pass a function directly to
.css().It will iterate the elements, and the return values will be the new values for
'top'.