[support] adding an Onclick setting to jquery drupal settings

Fred Jones fredthejonester at gmail.com
Sat Dec 26 18:53:52 UTC 2009


> 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


More information about the support mailing list