ksjQuery Sliding Spoiler
My very first attempt at a plugin so where else to start other than BB code (yet another one, right)?
In essence, everything this plugin does, can be done via a template edit and by creating 2 custom BB codes. I created this little plugin based on some javascript by Andy Langton (http://andylangton.co.uk/articles/javascript/jquery-show-hide-multiple-elements/) which, maybe not very efficiently, prevents problems when multiple spoilers are on one page. This is significant because many of the other jQuery spoilers I have tried could only handle one per page as a second or more would just mean no working spoilers at all. I have seen an alternate version using $(this.hash) in far less lines but I only tried this one and it worked which was good enough for me. Installation Note: only tested on 4.1.1 but it should work on 4.x 1) Upload the file in the upload folder to your forum root (clientscript/ksspoiler.js). 2) Import the product (product-ksjqueryspoiler.xml) The plugin adds two scripts (mine and jquery) to headinclude_css and manually inserts two custom BB codes called jspoiler. One version uses {option} and the other does not to allow for a little flexibility. I highly suggest that you customize the name and titles of the BB codes to your liking. All this is meant to do is to a utomate a couple easy steps (mainly because I haven't been able to learn any more than that ._. sorry!) Uninstall However, due to my lack of knowledge, the only way to fully uninstall the plugin is to uninstall the plugin and then manually deleting the custom BB code. A live preview can be seen here near the bottom: http://kagami-sama.com/content/shinryaku-ika-musume-119/ ============================= Credit to Andy Langton for writing the javascript Download
ksspoiler-0.1.zip (5.1 KB, 114 downloads) |
Similar Mods
BB Code Enhancements [BB Code] Sliding Spoiler with jQuery | vBulletin 4.x Add-ons |