Jump to:

3447 Posts in 1032 Topics by 872 members

Template Questions

SilverStripe Forums » Template Questions » ThickBox won't work with self closed tags

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1
Go to End
Author Topic: 2479 Views
  • OscarGodson
    Avatar
    Community Member
    9 Posts

    ThickBox won't work with self closed tags Link to this post

    First off, I used ThickBox probably over 100 times and have customized the source code a lot as well.

    My problem is making anything a gallery using the rel="" method just totally breaks thickbox. It just shows the loader gif and runs on and on. If you take out the rel="" it works 100% fine.

    I have done numerous tests and found out that it breaks with the <script> tags are self closed like <script > rather than <script></script>

    I am placing my script tags directly into the template in the head. Things I have tried are:

    • • Removed ALL other JS code from SS except jQuery and ThickBox
    • • Added alerts to the start and finish of both jQuery and ThickBox and all alerts show up
    • • Tried append() and prepend() jQuery functions to try to add the script tags after SilverStripe changed them, no luck. They wont even appear.
    • • Tried it locally with same HTML Head (xml head and XHTML 1.1 DOCTYPE) but with <script></script> and it works. With <script > it totally breaks. this is also on an HTML page with nothing but 3 <a> and <img>s, 2<script>s (jQuery and ThickBox), and one <link> (thickbox.css). other than that it's barebones.
    • • Testing this in FF3
    • • Also tried other module windows and they are also breaking, but swfObject, jQuery, and my own code JS and jQuery code works fine.

    anyone have any ideas?

    [edit reason] you guys should really put in bullets/discs for bbcode ulists.

  • ckaufman
    Avatar
    Community Member
    1 Post

    Re: ThickBox won't work with self closed tags Link to this post

    Download the other jQuery file that is referenced on the site. That should do it. Definitely needs to be addressed on the thickbox site.

    http://jquery.com/demo/thickbox/js/jquery-1.1.3.1.pack.js

    Good Luck

  • edk
    Avatar
    Community Member
    39 Posts

    Re: ThickBox won't work with self closed tags Link to this post

    I know this a bit late in this thread, but this may save someone else some frustration...

    The issue is using Thickbox with a newer version of JQuery. The Solution: See this post for the full details. http://www.stuffbysarah.net/2009/02/16/thickbox-and-jquery-131/

    2479 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.