Show/Hide 1.6
All I did with this update is change the way the javascript is presented in the header of the page. It’s not a big deal but if you want to upgrade you can. It still works the same way as the old version did. I also included a copy of the html code you would need in your posts. It’s exactly the same as the code on my site.
Download
Here’s a demo:
Expand
Hopefully (if I can figure it out) I’ll incorporate TinyMCE so that this plugin will become much more user-friendly than it is now. That will all be in the next update (again if I can figure it all out).
Update 7/11: I’ve started working on the TinyMCE addition to this plugin. If you have an advice or help on creating TinyMCE buttons, it would be greatly appreciated.
Thanks.
This entry was posted in
Code,
Plugin and tagged
plugins,
Solutions. Bookmark the
permalink.
Andrew, I’ve been working with that slide effect you mentioned before and it seems to be working pretty well.
Check here: http://tiagosartor.com/test/test3.html
Forgot to ask you something. Do you know if there’s a way to call the div’s class instead of the ID in this case?
Thank you.
Looks pretty nice! Can you have numerous show/hides on one page with your code?
If you wanted to use classes instead of ids, you would need to alter the showhide.js file. I don’t know how you would do it though. I think you would change part of the file from document.getElementById(theName) to document.getElementByClass(theName) or something like that. getElementByClass soesn’t actually exist. I’ll see if I can find a solution.
Well, that’s the problem and why I asked you about the class. Since it gets the element by the ID, you could only have one in the same page. It does work if you put more, but the code doesn’t validate though.
Otherwise, you could create a second function, exactly the same as the first one, and just change the ID it gets. But this would take a longer time to load, so it’s not cool.
I know there’s a way to get a specific class (getElementByClass doesn’t exist), you can find a lot of solutions if you Google it but it’s not easy to make everything works properly. I’ll try though.
Thank you!
I’ve found a couple of people who have created javascript classes for calling divs by their Class rather than an ID. If you want the code I can give it to you or you can Google it. There’s a couple of solutions out there.
The only thing is it would all be too complicated. I’ve been looking for a really simple slide javascript file but the ones I’ve found are all too complicated and lengthy and do more than I want them to do. I just want everything to be really simple but work very well. I’m making progress on that TinyMCE button, which would make using this plugin a lot more user-friendly and simple.
Thanks!
If you don’t mind, I’d like to see what you’ve found. You can send it to my email (tiagosartor [at] gmail [dot] com). I’ve been trying to find it on Google, but none of them worked for me.
I have exactly the same problem. All the codes are way too long and complicated as well. There must be something easier and shorter out there.
Anyway, thank you for your effort.
I sent you the code a while ago. Did you get it?
Also I don’t know too much about TinyMCE so it’s taking some time. The truth is I don’t know if I’ll ever complete it at all because I just haven’t had the time recently and I’ll be out of the country for a while in a week. Sorry if I’m not able to finish it. I’ve gotten pretty far though.
Andrew, you’ve made my day!
Big thanks for coding this excellent plugin
Cheerz
curdaneta
I’m glad you liked it! Sorry it’s taken me so long to reply. I’ve been preoccupied with school recently and haven’t updated my site much as a result. Is there anything else you’d like to see happen with this plugin?