Posts Tagged thickbox

Thickbox(3.1) image group not working with latest jQuery? Try this

Today one of my colleague faced an issue with Thickbox. He was using “rel” tag to group images and show in gallery. Code was working fine but suddenly it stopped working after updating the jQuery library to latest version(1.4). After lot of debugging we found the issue. Below line throws an exception
“unrecognized expression: “.

 TB_TempArray = $("a[@rel="+imageGroup+"]").get();

Issue was with “@” selector which was not supported in latest jQuery. We had replaced it and finally got the code working.

TB_TempArray = $("a[rel="+imageGroup+"]").get();

Hope this may help someone :)

,

4 Comments

jQuery height function not working in thickbox iFramed content? try this

Last week we were trying to run a scroll script (DYN-WEB’s scrolling code ) inside thickbox iFramed content. Unfortunately code was not working and the reason was the element height not working. We tried alternative jQuery element height and the result was same. The height we were getting was ‘0′.

Finally we fixed this issue by using setTimeout and calling the scroll script after a small delay.

 $(function() {
    	alert($(".box").height()); // not working, what we got was '0'
    	setTimeout('alert($(".box").height());',500); // worked
 
  })

Hope this may help someone :)

,

2 Comments