is the JavaScript showing up at the bottom of your source code?
If so, then you need to write some JavaScript code to remove the content from the page.
This would replace the comment that says ‘// run the necessary javascript to remove the content’ with the correct code.
Sorry – I’m not sure what you mean.
I thought I’d add that code to the functions.php file. and then somehow call it from my posts or pages.
I was wondering how I’d call it.
If I have a piece of shortcode that shows an image, but I wanted the image to go away after 20 seconds.
What would I put in the actualy page to remove that shortcode?
ex:
[remove_content_timer][show image="image.gif"][/remove_content_timer]
note: I’m sorry – I’m clueless.
could I use this in wordpress?
http://jsbin.com/aguyuw/1/edit?html,js,output
Hmm. A shortcode in WordPress is used to output HTML into the page. So, when you put a shortcode like [gallery id='1,2'] (the WordPress Shortcode to insert a gallery from the Media Library) it outputs a bunch of html. If you do a “view source” you can see what that HTML looks like.
The JSbin code you pasted would work – but you’ll need to figure out what the HTML is that is being output by the shortcode, and you’ll then need to address that DOM element and remove it from the page.
This line here:
$('#target').remove();
Removes the following HTML:
<p id='target'>Foobar</p>
But you’ll have to figure out the SPECIFIC HTML in YOUR page to remove.
oh. thanks. I’ll maybe look for another option. #OverMyHead