Get ID of the First and Last clicked DIV
Posted: 05 Dec 2014, 14:21
Hi,
How can i st into a variable, for example an Array with two elements, the ID of the first and the last clicked Div which is into a parent DIV.
For example:
How can i st into a variable, for example an Array with two elements, the ID of the first and the last clicked Div which is into a parent DIV.
For example:
Code: Select all
<div id="parent">
<div id="id1">https://coursesweb.net/</div>
<div id="id2">http://www.marplo.net/</div>
<div id="id3">http://php.net/</div>
<div id="id4">http://jquery.com/</div>
...
</div>
<script>
var fl_id = ['id1', 'id2']; // here the id of the first / last clicked div
</script>