hey,
had no idea what title this post should have, hard to describe 🙂
i have a dynamic id’s with a number
<div id="post-full-116">Content</div>
<div id="post-116">Content</div>
i want to query the dynamic number (in this case 116) of id=”post-full-116″ and if another div on the page with id=”post-116″ exists i want to remove that.
sounds weird i know. so you get the idea behind it, the div with id=”post-number” holds a preview of a post and the the div with id=”post-full-number” holds the full content of a post.
i don’t want to show the preview of a post if the full post is already shown – so i simply want to hide it with jquery. i know i should do that on the serverside before, however in this case jquery would be perfect.
any idea how i can query the number of the dynamic id and the remove the appropriate div with the same number?
thank you
I’m thinking you would do something like this:
That should grab any “full” posts, find the number of the post, and hide the “preview” version of it.
UPDATE:
Here’s a live demo of that: http://jsfiddle.net/Ender/saUQf/