Is there somebody who knows how to implement Shadowbox options?
I tried something like this:

drupal_add_js('
  Shadowbox.open({
      options: {onOpen: alert("test")}    
   }); 
 ', 'inline', 'footer');

However, this alerts "test" already when only the page is loaded. Anybody knows why that is?

Comments

hamsterbacke42’s picture

Nevermind, found that this works:

$sbsetting = "Shadowbox;options={onOpen: function(o){ alert('onOpen callback triggered')} }";
$o .= '<a href="..." alt="..." rel="'.$sbsetting.'">' ;

Not really a Drupal issue

hamsterbacke42’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.