This may be a little longwinded to give you all the details so please bare with me. I'm hoping someone has some creative suggestions regarding how to approach a problem I'm having.
I've created a web part which reads list items from an announcement list. I then display the "title" field as a link on the web part for the most recent 5 items. When the title link is clicked, it uses jQuery UI to pop open a window and display
the body. Currently, when a list item is displayed, I programmatically give that table row a class name.
Example: If there are 3 list items, item 1 would have a class name class="item1", item 2 is class="item2" etc.. Currently I have a hard stop at 5 items. This is because the jQuery looks for the class names in order to know which body
to display. So in my js file I have those class names hard coded up to 5 items.
Finally! The problem I'm having is that I can't have multiple instances of this custom web part on the page due to the class names. If I have 2 instances of this web part on the same page and I click the first item from one of the web parts, the body of
the first item on both web parts opens. Because both have the class name "item1". I am looking for suggestions regarding how I can implement this in a way that will allow the class names to be auto generated (proba
View Complete Post