jQuery storing and referring to an array of items -


I'm not looking at JQuery / Javascript words at all. The behavior I am seeing is similar to your general lightbox slideshow with the following elements:

  • A list of items
  • Clicking on an item will create a new element Returns the item in the list
  • While the new element contains the next / previous navigation, which refers back to the list of items.

I am making something like this that is looking for a technical approach to dealing with the above and above.

I have a sample code for:

  & lt; Ul & gt; & Lt; Li & gt; & Lt; A href = "samplelink.html" & gt; Item 1 & lt; / A & gt; & Lt; / Li & gt; & Lt; Li & gt; & Lt; A href = "anotherlink.html" & gt; Item 2 & lt; / A & gt; & Lt; / Li & gt; & Lt; Li & gt; & Lt; A href = "onemorelink.html" & gt; Item 3 & lt; / A & gt; & Lt; / Li & gt; & Lt; / Ul & gt;  

I have some set up so that every light A gets a click event that creates a new overlay DIV on the page, then a .load ($ (this) .attr (' Href))

It all works very well.

I do not know how to do it, that is what index of the click did I click on the new device so that I can add the appropriate previous / next link and actually see the next / previous element in the original list . Typical example, if I click on the second list item, then I create it in the new DIV, how do I give information that "this was the second link that it opened".

In your div code, you can again merge your items on the href value and the next () And can use the given element to get the other siblings first ().


Comments

Popular posts from this blog

c# - How to capture HTTP packet with SharpPcap -

php - Multiple Select with Explode: only returns the word "Array" -

php - jQuery AJAX Post not working -