javascript - Resizing JQuery thickbox window dynamically -


i have thickbox pops when click on link. depending on user's browser size want thickbox constant 500px or width , height change dynamically depending on height of user's browser. possible?

another option use jquery work out browser size , resize thickbox suit. not elegant css solution complete answer... here method done.

// set displaywidth/height 90% of window var displaywidth = $(window).width() * 0.9; var displayheight = $(window).height() * 0.9; // animate thickbox window new size (with 50px padding  $("#tb_window").animate({     marginleft: 0 - (displaywidth + 50) / 2,     margintop: 0 - (displayheight + 50) / 2,     height: displayheight + 50,     width: displaywidth + 30 }, {     duration: 800 }); $("#tb_ajaxcontent").animate({     height: displayheight,     width: displaywidth }, {     duration: 800 }); 

Comments

Popular posts from this blog

asp.net - repeatedly call AddImageUrl(url) to assemble pdf document -

java - Android recognize cell phone with keyboard or not? -

iphone - How would you achieve a LED Scrolling effect? -