Custom Query (7259 matches)
Results (28 - 30 of 7259)
Ticket | Resolution | Summary | Owner | Reporter |
---|---|---|---|---|
#3613 | wontfix | Accordion: cookie persistence | ||
Description |
Here is an example of adding external cookie persistence to an accordion: var accordion = $("#accordion"); var index = $.cookie("accordion"); var active; if (index !== null) { active = accordion.find("h3:eq(" + index + ")"); } else { active = 0 } accordion.accordion({ header: "h3", event: "click hoverintent", active: active, change: function(event, ui) { var index = $(this).find("h3").index ( ui.newHeader[0] ); $.cookie("accordion", index, { path: "/" }); }, autoHeight: false }); This should be integrated into the plugin, with the option to enable it (requires cookie plugin) and the option to customize the cookie settings, eg. for a different path. Until the change-option is added, that callback must be used like this (currently untested): {{{{ $("...").accordion(...).bind("accordionchange", function(event, ui) {
}); }}} |
|||
#3614 | fixed | Accordion: support multiple events being set at the same time | ||
Description |
Here is a hoverintent implementation as a special event: var cfg = ($.hoverintent = { sensitivity: 7, interval: 100 }); $.event.special.hoverintent = { setup: function() { $(this).bind("mouseover", jQuery.event.special.hoverintent.handler); }, teardown: function() { $(this).unbind("mouseover", jQuery.event.special.hoverintent.handler); }, handler: function(event) { event.type = "hoverintent"; var self = this, args = arguments, target = $(event.target), cX, cY, pX, pY; function track(event) { cX = event.pageX; cY = event.pageY; }; pX = event.pageX; pY = event.pageY; function clear() { target.unbind("mousemove", track).unbind("mouseout", arguments.callee); clearTimeout(timeout); } function handler() { if ( ( Math.abs(pX-cX) + Math.abs(pY-cY) ) < cfg.sensitivity ) { clear(); jQuery.event.handle.apply(self, args); } else { pX = cX; pY = cY; timeout = setTimeout(handler, cfg.interval); } } var timeout = setTimeout(handler, cfg.interval); target.mousemove(track).mouseout(clear); return true; } }; Its customizable by modifying the global $.hoverintent object. This can be used in combination with a click event: $(...).accordion({ event: "click hoverintent" }); This produces a good behaviour on systems with a mouse (no click needed, barely any unintential hovers) and still works on systems without a mouse, eg. iPhone (no mouseover event). For multiple events to get namespaced, the binding code has to be modified: if (options.event) { this.element.bind(options.event.split(" ").join(".accordion ") + ".accordion", clickHandler); } |
|||
#3615 | wontfix | clicking today doesnot parse today's date | ||
Description |
It seems like a bug to me: when I click on "today" and it doesn't parse today's date, it only works when I click on "Prev" and hitting today will take me back to current month. I personally think it will be more helpful if it simply parse today's date to the input field |