Click, mouse up, etc do not seem to be working correctly. Kind of at a loss as to why jQuery is not attaching the events correctly, and/or firing them upon the events.
Keyboard navigation seems to work just fine; handling the tab keys, arrow keys, and so on, works just fine; I am able to select the container div and drill into the textarea within to give it focus. No problems there.
However, how come the mouse events not work properly, not firing on the elements for which I've attached them?
Apparently I'm not the only one who has encountered this issues, at least gauging from the search results. And before you mention it, I've double and triple checked the usual suspects, such as whether there are elements (which are dynamic) at the time I attach the events, whether this is before or after appending to containers (which it is after), this sort of thing. I am positive that the elements have been appended to their parent containers well before I attach mouse events and such.
I wondered whether z-index may have some issue there? Or possible opacity, fill color (i.e. transparent), etc. I've double checked that the textarea z-index is greater than the container divs.
I've also double checked that the mouse events are even occurring using Chrome debugger; they are.
I am developing a Controller for an MVC style custom object and I'd like to connect some sort of event handling mechanism.
It's not important what the controller is, but let's say I have a couple of events such as "happening" and "happened". Something like this:
$(".happeningCtrl").happening(function(args) { /* something is about to happen */ });
$(".happeningCtrl").happened(function(args) { /* something just happened */ });
Along these lines, with them being raised something like this:
$(".happeningCtrl").happening();
$(".happeningCtrl").happened();
Good so far?
Event driven programming is not new to me, but how JavaScript and/or jQuery approach it is somewhat new. Much of the background discussion I am finding revolves around DOM this and DOM that. However, in this case, we are talking about a custom controller, for which I would like to extend (?) a custom event or three.
Thus far I have approached it as a kind of poor man's event handler with ad-hoc JavaScript arrays of $.isFunction(...) verified handlers. Not the safest way to accept event handlers, I agree, but it will "work".
However, if there is a better way of accomplishing this using jQuery, for instance, I'd like to pursue that instead, provided the overhead isn't too steep for assuming that as a dependency.
Don't know if any of this makes sense. Can someone offer any guidance or enlighten me as to perhaps a decent tutorial around this topic?
How do I keep a selectmenu drop down from hiding beneath the bottom of the dialog? In other words, isn't it customary for a drop down menu to show above the dialog?
I have successfully populated a select menu and can navigate the menu in the UI just fine.
However, when I go to query either the selectmenu val() or the selected option val(), neither of them reflect what I just selected. It is returning a value, but not the correct one, that I just selected.
This seems like a but to me, but I'd like to at least find a workaround if possible.
I'm using jQuery UI 1.12.1 against jQuery 1.12.4 in an ASP.NET MVC 5 (AFAIK, V5) web page.
I've tried a couple different ways, and the best case that I had was a series of nested $.get(...).then(...) callbacks. This works, to a point, but leaves me with a JavaScript stack overflow on the client side, best guess; the ASP.NET server side is "happy", at any rate, but this is useless unless the client side can digest the results without stack overflow.
I need to know how to BLOCK each $.when(), or $.get(), might be better, or if I can simply block and wait for the done handler to be truly done, better still.
I'm sure it's a simple callback, but the reference escapes me.
I know how to work with selectors in general, and they are quite powerful. I'm not sure how to do the same when starting from known value(s) or an array of values.
So I was "successful" in re-styling a checkbox using UI .button().
However, I suspect that this has had a peculiar side effect; if I understand correctly, the original control(s) are destroyed, and recreated. Fine, fair enough. But they are re-created outside the original form, so therefore are not included in the postback.
So, ... appendTo to the rescue? Only, I try this, but it doesn't seem to work? I could be using it wrong.
$(function() {
var wizDiv = $("#wizardDiv");
$("#shouldRealign").button().appendTo(wizDiv);
});
This doesn't seem to be working, but I figure as long as the div is contained in my form, I should be able to append the input to it?
This doesn't seem to be working, though; I do not see the input name among my Request.Form items passed through the post back (ASP.NET MVC).
I am trying to install, which involves some upgrading, from jQuery UI. I am aiming at installing the UI widgets, for button, checkbox, and other support, as painlessly as possible.
I am trying to get there by installing jQuery UI Widgets: All, which seems like as sensible a bundle as any of them.
Background, as far as I can tell, the ASP.NET MVC project(s) started with some canned inclusion of jQuery., which itself perhaps needs to be dialed back a bit, and reset with the Widgets: All.