Hi, I am trying to create an html element with one jquery plugin then pass the jquery object created to another plugin for more modifications. for example : 1 plugin would create the object the second one would add css ( i know this isnt the best way to do things) but a 3rd plugin calls the first one then the second one. I hope my description was clear :) thanks for your help
I was thinking something more like this :$.fn.plugin1 = function(options) { //functionreturn jqueryobject}$.fn.plugin2 = function(options) { }$.fn.plugin3 = function(options) {object = $('selector').plugin1()$(object).plugin2() }this however isnt working
salmane
2009-12-28 12:17:44
A:
It depends a lot on the plugin code. Maybe you could give us an example.
Given your above description, the following may suffice:
$.thirdPluginFunc($.secondPluginFunc($.firstPluginFunc()));
//$.firstPluginFunc - Create the object
//$.secondPluginFunc - Apply the CSS
James Wiseman
2009-12-28 11:24:04