Free Code Collection

Tag: Software/applications

[jQuery] changing default thickbox behavior

by Hussain on Jul.05, 2009, under Developers, JQuery

To prevent closing by clicking on the overlay and remove the ‘close’ link
(better IMHO than just disabling it), remove line 38:
$("#TB_overlay").click(TB_remove);

remove the TB_closeWindow <div> from line 133:
$("#TB_window").append("<a href=” id=’TB_ImageOff’ title=’Close’><img
id=’TB_Image’ src=’"+url+"’ width=’"+imageWidth+"’ height=’"+imageHeight+"’
alt=’"+caption+"’/></a>" + "<div id=’TB_caption’>"+caption+"<div
id=’TB_secondLine’>" + imageCount + prev.html + next.html + "</div></div>");

remove line 135:
$("#TB_closeWindowButton").click(TB_remove);

remove the TB_closeAjaxWindow <div> from line 205:
$("#TB_window").append("<div id=’TB_title’><div
id=’TB_ajaxWindowTitle’>"+caption+"</div></div><iframe
frameborder=’0′
hspace=’0′ src=’"+urlNoQuery[0]+"’ id=’TB_iframeContent’
name=’TB_iframeContent’ style=’width:"+(ajaxContentW +
29)+"px;height:"+(ajaxContentH + 17)+"px;’ onload=’TB_showIframe()’>
</iframe>");

and 207:
$("#TB_window").append("<div id=’TB_title’><div
id=’TB_ajaxWindowTitle’>"+caption+"</div></div><div
id=’TB_ajaxContent’
style=’width:"+ajaxContentW+"px;height:"+ajaxContentH+"px;’></div>");

remove line 210:
$("#TB_closeWindowButton").click(TB_remove);
and remove lines 258-259:
$("#TB_overlay").unbind("click");
$("#TB_closeWindowButton").unbind("click");


Thickbox also has a keydown handler so that if you push ‘escape’ it closes.
Remove lines 236-245 to prevent this:
document.onkeyup = function(e){
if (e == null) { // ie
keycode = event.keyCode;
} else { // mozilla
keycode = e.which;
}
if(keycode == 27){ // close
TB_remove();
}
}


To add the ‘close’ functionality to something, do this:
$("#myTbCloseButton").click(TB_remove);

Source: (http://www.mail-archive.com/discuss@jquery.com/msg18856.html)
  • Share/Save/Bookmark
Leave a Comment :, , , , , , , , more...

What Knowledge And Software/applications Would I Need To Make My Own Web Browser?

by Beniwal on Jul.05, 2009, under Web browser

A friend of mine and I are planning on creating a web browser that will be able to be downloaded by the masses and enjoyed just like other web browsers. I just want to feel how it is like to make a web browser. If anyone has any experience can you please tell me what knowledge/skills I would need and the software/applications I would need to create a web browser. I would appreciate if you could be descriptive and explain alot to me. Wish me luck =D
  • Share/Save/Bookmark
1 Comment :, , , , , , more...

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!

Archives

All entries, chronologically...