From The Blog

jQuery Colorbox: Hide background page vertical scroll bar on open

28 October 2013, in

To hide the scroll bar of the background page when the colorbox opens "like facebook for example"


/* make the page scroll dissapear when colorbox is open and retrieved back when colorbox is closed */
var screen_position;
$(document).bind('cbox_open', function() {
screen_position = $("body").scrollTop();
$('body').css({ overflow: 'hidden' });
}).bind('cbox_closed', function() {
$('body').css({ overflow: 'auto' });

Post a Comment

How can I check if a jQuery plugin is loaded?

7 September 2013, in

Generally speaking, jQuery plugins are namespaces on the jQuery scope. You could run a simple check to see if the namespace exists:

if(jQuery().pluginName) {
     //run plugin dependent code

,If we're talking about a proper jQuery plugin (on that extends the fn namespace), then the proper way to detect the plugin would be:

if($.fn.pluginname != 'undefined')


Post a Comment

jQuery: reload an iFrame

23 August 2012, in

//reload 1 iframe

Post a Comment

Get selected value text from dropdown with jquery

8 July 2012, in

the fastest way to get selected value text from a dropdown is using:


Post a Comment

jQuery: Accessing iFrames

4 June 2012, in


but this will give you the error "Unsafe JavaScript attempt to access frame"

Post a Comment

How to check jQuery version ?

14 February 2012, in
// Returns string Ex: "1.3.1"

// Also returns string Ex: "1.3.1"

Post a Comment