Override jQuery .val() function?

You can store a reference to the original val function, then override it and do your processing, and later invoke it with call, to use the right context: (function ($) { var originalVal = $.fn.val; $.fn.val = function(value) { if (typeof value != ‘undefined’) { // setter invoked, do processing } return originalVal.call(this, value); }; … Read more

How can I extend jQueryUI datepicker to accept an additional argument?

How about: var __picker = $.fn.datepicker; $.fn.datepicker = function(options) { __picker.apply(this, [options]); var $self = this; if (options && options.trigger) { $(options.trigger).bind(“click”, function () { $self.datepicker(“show”); }); } } Usage: $(“#date”).datepicker({ trigger: “#button” }); $(“#date2”).datepicker({ trigger: “#button2” }); Example: http://jsfiddle.net/gduhm/ Or, less intrusively with your own jQuery plugin: $.widget(“ui.datepicker2”, { _init: function() { var $el … Read more

Looking for a JQuery plug-in similar to Accordion, but that allows multiple sections open at once [closed]

Thanks for everyone’s suggestions, but I finally found something on my own that does exactly what I was looking for. I’m adding it as an answer for anyone else who needs something similar. The Solution Using the code and sample XHTML here you can extend the JQuery Accordion plug-in to have multiple panels open at … Read more