| We hope you enjoy your visit. You're currently viewing our forum as a guest. This means you are limited to certain areas of the board and there are some features you can't use. If you join our community, you'll be able to access member-only sections, and use many member-only features such as customizing your profile, sending personal messages, and voting in polls. Registration is simple, fast, and completely free. Join our community! If you're already a member please log in to your account to access all of our features: |
| [ C ] Clickable field | |
|---|---|
| Tweet Topic Started: Mar 29 2010, 02:46 AM (335 Views) | |
| kagemask | Mar 29 2010, 02:46 AM Post #1 |
|
Member
![]() ![]() ![]()
|
I need some quick help with this code. This basically is a spoiler tag code. However, currently the tag shows/hides text when you click anywhere on the spoiler (Header and Text Area). Is there anyway to limit the spanning/collapsing to when you click on the spoiler header only? Not when you click on the text area of the spoiler. It makes selecting/copying text from the box difficult since when you click, highlight, then copy the spoiler box will hide the text because you clicked on the text area. <script type="text/javascript"> <!-- var e = document.getElementsByTagName("td"); var x = /\[spoiler\=(.+?)\](.+?)\[\/spoiler\]/gi; for(var n = 0; n < e.length; n ++) { if(!e[n].getElementsByTagName("textarea")[0] && x.test(e[n].innerHTML)) e[n].innerHTML = e[n].innerHTML.replace(x, "<div class='spoiler' onclick='this.lastChild.style.display = (this.lastChild.style.display == \"none\") ? \"block\" : \"none\";'><span class='spoiler-title'>$1</span><span class='spoiler-message' style='display: none'>$2</span></div>"); } // --> </script> |
![]() |
|
| Cory | Mar 30 2010, 01:39 AM Post #2 |
|
Member
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
Try that instead. |
![]() |
|
| kagemask | Apr 1 2010, 04:58 PM Post #3 |
|
Member
![]() ![]() ![]()
|
Yes, this works perfectly! Thank you very much! |
![]() |
|
| Holysavior-ZNR | Apr 1 2010, 08:23 PM Post #4 |
![]()
Member
![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
Completed! Your code request has been completed. Thank you for using our Member Request system here at Zathyus Networks Resources! If you have any questions regarding this topic, feel free to PM the code creator or post a new topic in the request forum. ![]() Have a nice day! |
![]() |
|
| 1 user reading this topic (1 Guest and 0 Anonymous) | |
| « Previous Topic · Closed Requests · Next Topic » |
| Track Topic · E-mail Topic |
4:52 AM Jul 11
|


![]](http://b1.ifrm.com/0/1/0/p601690/pipright.png)




4:52 AM Jul 11