Select from following answers:- parent()
- width()
- position()
- Insertafter()
- All Above
In jquery position () method can be used.It gives the position object which can be used to determine the the left and top position relative to its parent element to get the position in html element.
Example
<script>
var position = $("h1").position();
alert(position.left + " : " + position.top);
</script>
the code snippet will find the position object for the “h1” element and alert its left and top position relative to its parent.
Show Correct Answer
Asked In: spotted while learning |
Alert Moderator