Commit e15c2072 authored by frjo's avatar frjo

Make urlParam return empty instead of 0.

parent d4b5900a
......@@ -9,8 +9,8 @@ Drupal.behaviors.initColorboxInline = function (context) {
else {
var results = new RegExp('[\\?&]' + name + '=([^&#]*)').exec(url);
}
if (!results) { return 0; }
return results[1] || 0;
if (!results) { return ''; }
return results[1] || '';
};
$('a, area, input', context).filter('.colorbox-inline:not(.initColorboxInline-processed)').addClass('initColorboxInline-processed').colorbox({
transition:settings.transition,
......
......@@ -4,8 +4,8 @@ Drupal.behaviors.initColorboxLoad = function (context) {
var settings = Drupal.settings.colorbox;
$.urlParam = function(name, url){
var results = new RegExp('[\\?&]' + name + '=([^&#]*)').exec(url);
if (!results) { return 0; }
return results[1] || 0;
if (!results) { return ''; }
return results[1] || '';
};
$('a, area, input', context).filter('.colorbox-load:not(.initColorboxLoad-processed)').addClass('initColorboxLoad-processed').colorbox({
transition:settings.transition,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment