[support] adding an Onclick setting to jquery drupal settings

Idan Arbel idan at arbel-designs.com
Sat Dec 26 19:29:28 UTC 2009


Thanks for the help, 

I actually understand that part, but I think in this script the onClick is
both..maybe going by this:

http://finnrudolph.de/ImageFlow/Documentation

this is an example:

var Highslide_1 = new ImageFlow();
Highslide_1.init({ ImageFlowID: 'Highslide_1', 
                        onClick: function() { return hs.expand(this, 
                                    { src: this.getAttribute('longdesc') }
); } });

http://finnrudolph.de/ImageFlow/Combinations

let me I'll try adding it inline.

Thanks

Idan

-----Original Message-----
From: support-bounces at drupal.org [mailto:support-bounces at drupal.org] On
Behalf Of Fred Jones
Sent: Saturday, December 26, 2009 8:54 PM
To: support at drupal.org
Subject: Re: [support] adding an Onclick setting to jquery drupal settings

> jQuery.extend(Drupal.settings, { "basePath": "/websites/shooky/",
> "admin_menu": { "margin_top": 1 }, "thickbox": { "close": "Close", "next":
> "Next \x3e", "prev": "\x3c Prev", "esc_key": "or Esc Key", "next_close":
> "Next / Close on last", "image_count": "Image !current of !total" },
> "imageFlow": { "views-slideshow-imageflow-images-1": { "aspectRatio":
> "1.964", "imagesHeight": "0.67", "imageCursor": "pointer", "sliderCursor":
> "pointer", "startID": 1, "slider": 1, "captions": 1, "imageFocusM": "1.0",
> "scrollbarP": "0.6", "imageFocusMax": "4", "onClick" : "alert('tets');"  }
}
> });

onlick can not be added this. It's added in a JS file or via "inline"
JS. Then it's added to a jQuery object like this:

$("some selector").onclick(function(){alert('test')});

where "some selector" is a CSS selector.

Looks to me like you need to read a tutorial in jQuery to understand
how it works.

HTH
-- 
[ Drupal support list | http://lists.drupal.org/ ]



More information about the support mailing list