When clicking a certain link (with an `onclick` handler or like this), there should appear a popup (similar to a tooltip) with HTML content which I provide.
The popup does NOT close when I just move the mouse. To close the popup we click outside it.
It is desirable that the popup is displayed with an arrow pointing to the link with `onclick` clicking which opened the popup.
Is there a plugin for this?
If no, I am willing to develop it myself, but my CSS design skills are not very strong.
I initialize a datepicker inside <div id="dialog" style="display:none">. Then I do $("#dialog").dialog({modal:true, draggable:false, resizable:false});
As the result the dialog opens with the datepicker in active state that is with visible drop-down calendar (because it gains focus).
How to prevent activating the datepicker by .dialog() method?
Hm, or maybe it would be better not to activate it? (The reason is that this way the text input for the date would be focused and clicking it would not open the datepicker. This is also bad.)
I propose to add a new kind of selector ":active". This selector should select these form elements which are active (that is are to be submitted when the form is submitted).
With this selector we would be able to do the following:
var data = {}; for(var i=0; i<form.elements.length; ++i) { var elt = form.elements[i]; if($(elt).is(':active')) data[elt.name] = elt.value; } $.post(form.action, data, function(text){/*...*/});
As there are no such selector, I need the following bogus code:
var data = {}; for(var i=0; i<form.elements.length; ++i) { var elt = form.elements[i]; if(!$(elt).is(':radio') || $(elt).is(':checked')) data[elt.name] = elt.value; } $.post(form.action, data, function(text){/*...*/});