Hi, I need to make a script using Jquery that can find all links in a spot and mark them.
1. Need to find all spots on a page 2. When it finds a spot, I need to find all links in the spot 3. When all links has been found, i then need to store what number the link is in the markup. In the example underneath the "link number 2" is number 3 in the markup. Example mark-up --------------------------------------------------------------------------- <div class="spot"> <h2>Spot header</h2> <a href="page.html" title="link 1"><img src="head.jpg" /></a> <p> <a href="page.html">link number 1</a> <a href="page.html">link number 2</a> <a href="page.html">link number 2</a> </p> </div> --------------------------------------------------------------------------- Wanted output: --------------------------------------------------------------------------- <div class="spot"> <h2>Spot header</h2> <a href="page.html" title="link 1" onclick="senlinknumber(1)"><img src="head.jpg" /></a> <p> <a href="page.html" onclick="senlinknumber(2)">link number 1</a> <a href="page.html" onclick="senlinknumber(3)">link number 2</a> <a href="page.html" onclick="senlinknumber(4)">link number 2</a> </p> </div> --------------------------------------------------------------------------- --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "jQuery UI" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/jquery-ui?hl=en -~----------~----~----~----~------~----~------~--~---
