Distracted Posted March 20, 2010 Share Posted March 20, 2010 OK, so I've got this blog on Wordpress, and I'm trying to use the equivalent of the hide parts of posts in the same way the spoiler-tag does here. So basically, I want to do this [spoiler=Click here for more]More using HTML. I'm not sure if every HTML-code works on wordpress, anyone else have experience with wordpress that can help me? Link to comment Share on other sites More sharing options...
Sy_Accursed Posted March 20, 2010 Share Posted March 20, 2010 There isn't such a code in html. You have to use dhtml (dynamic html) which draws on javascripts to create collapsing tables. Operation Gold Sparkles :: Chompy Kills :: Full Profound :: Champions :: Barbarian Notes :: Champions Tackle Box :: MA RewardsDragonkin Journals :: Ports Stories :: Elder Chronicles :: Boss Slayer :: Penance King :: Kal'gerion Titles :: Gold Statue Link to comment Share on other sites More sharing options...
TyrantElf Posted March 20, 2010 Share Posted March 20, 2010 exxactly paw_claw. you can make a spoiler script with javascript, but their is not a tag for "spoiler" you could use something like this: <script type="text/javascript"> function showSpoiler(obj) { var inner = obj.parentNode.getElementsByTagName("div")[0]; if (inner.style.display == "none") inner.style.display = ""; else inner.style.display = "none"; } </script> in the head and this is the code to hide <div class="spoiler"> <input type="button" onclick="showSpoiler(this);" value="Show/Hide" /> <div class="inner" style="display:none;"> This is a spoiler! </div>change "this is a spoiler!" to whatever you want. you cna change the value= to what you want the button to say. change were it says Proud Ubuntu User!There are no stupid questions, just stupid people. -Scott AdamsA computer once beat me at chess, but it was no match for me at kick boxing.-Emo PhillipsMy Blog! Link to comment Share on other sites More sharing options...
Nadril Posted March 20, 2010 Share Posted March 20, 2010 I'm willing to bet that there is a wordpress app that will allow you to use this sort of functionality. Especially you are going to be using the actual CMS to do the posting, not HTML. Link to comment Share on other sites More sharing options...
Distracted Posted March 21, 2010 Author Share Posted March 21, 2010 Wow, thank you very much, that code will certainly be useful. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now