Ok, I have a page that that has a DataFormWebPart that basically displays the info from a document library. Now what I want to do is, using jquery, display or hide a section in the web part.
I can do this beautifully, except for one problem: I need the id of the tags of both the hyperlink that I click to toggle the display and the id of the div that is the section that is displayed/hided.
$("#button").click(function(event) {
$("#section").slideToggle("slow");
});
SharePoint seems to automatically add a generated id to any tags added in a web part, which makes sense as these tags can be repeated any number of times
example:
<a id="{generate-id()}">
Example of this generated id once generated which can be seen when viewing the source code of the page:
<a id="ID0ECAA">
This obviously means that any static id's used won't work in the web part.
Now, what I've done so far is try to use the SharePoint Client Object Model to put the id's of these tags into an array using javascript, but have completely failed in the attempt. One of the reasons I believe I'm failing is because I'm not trying to get any of the values of any fields, but the id of a tag that simply sits in the web part.
Is this at all possible?