[jQuery] Re: Detecting pressed keys (not keypress, but if it's already pressed)
Anyone? On May 28, 12:11 pm, Charles Sexton [EMAIL PROTECTED] wrote: Hi guys and girls, I don't know if this is possible, but I'm aiming to detect whether or not a key is pressed, as in the key is already pressed when the page loads. My application changes the page when Ctrl+arrow is pressed, but without being able to detect whether Ctrl is still pressed when the next page loads, both keys have to be pressed again. So is there any way to detect if a key is currently pressed, but the keystroke occurred before the page loaded? Many thanks to all who help, Charles
[jQuery] Detecting pressed keys (not keypress, but if it's already pressed)
Hi guys and girls, I don't know if this is possible, but I'm aiming to detect whether or not a key is pressed, as in the key is already pressed when the page loads. My application changes the page when Ctrl+arrow is pressed, but without being able to detect whether Ctrl is still pressed when the next page loads, both keys have to be pressed again. So is there any way to detect if a key is currently pressed, but the keystroke occurred before the page loaded? Many thanks to all who help, Charles
[jQuery] Help understanding bind and adding to the DOM.
Hello everyone, From this thread: http://groups.google.com/group/jquery-dev/browse_thread/thread/22c0b936d2060dc4/ I now know what I need to accomplish, however I do not understand how it works. Would someone be able to explain simply how to add data to the DOM? I had a quick look at Live Query as I thought it would be simple to use (i.e. just include it and everything works), but I don't find it to be simple at all. Maybe I will once I understand the concept. Many thanks
[jQuery] Re: Hovering over jQuery retrieved HTML
Am I asking this question in the wrong place? Where would I go to get responses?
[jQuery] Re: Hovering over jQuery retrieved HTML
Hi Jolyon, I believe that's exactly what I'm doing, as it works perfectly fine for the first dropdown. It's when jQuery is told to look at HTML gained via Ajax that I begin to see a problem, but only with mouse gestures. The key functions work perfectly fine. Here's the code for the first dropdown (sites), which looks at HTML generated with the page, and the second dropdown (eaas), which looks at Javascript written HTML. // Display the list of sites in a dropdown when the form field is focused on. $(.activate_site_list).focus(function() { $(#site_list_dropdown).slideDown('fast'); }).blur(function() { $(#site_list_dropdown).slideUp('fast'); }); // Display a nice hover colour when the sites are focused on. $(#site_list_dropdown).find(li).hover(function() { $(#site_list_dropdown).find(.hover).removeClass(hover); $(this).addClass(hover); site_selected = true; scrollPosSites = 256; },function() { $(this).removeClass(hover); site_selected = false; scrollPosSites = 256; }); // Display the list of EAAs in a dropdown when the form field is focused on. $(.activate_eaa_list).focus(function() { $(#eaa_list_dropdown).slideDown('fast'); }).blur(function() { $(#eaa_list_dropdown).slideUp('fast'); }); // Display a nice hover colour when the EAAs are focused on. $(#eaa_list_dropdown).find(li).hover(function() { $(#eaa_list_dropdown).find(.hover).removeClass(hover); $(this).addClass(hover); eaaSelected = true; scrollPosEAAs = 256; },function() { $(this).removeClass(hover); eaaSelected = false; scrollPosEAAs = 256; }); On Oct 24, 4:40 pm, Jolyon Terwilliger [EMAIL PROTECTED] wrote: Hi Charles, I'm not sure exactly how your code is, but it seems like you would want to run the code that applies the .hover() function to the li items after you pull them in via each ajax request. On Oct 24, 5:26 am, Charles Sexton [EMAIL PROTECTED] wrote: Hello! I'm using jQuery to build a form dynamically. Here's how it works: You are presented with an input box. When you focus on the box a dropdown list appears that you can click on in order to insert the chosen option into the input box, or you can use the keyboard arrow buttons to select your choice. When you move to the next input box the page makes a call via AJAX to grab information for the input box based on the previous selection. The problem is that the .hover() function doesn't seem to work with the information that has been pulled into the document using jQuery (it works fine with the first list). The items that are pulled in are all list items (li{name}/li). Using keystrokes works on the items, just not mouse gestures. Would this be a jQuery bug or is there something I can do? Many thanks, Charles- Hide quoted text - - Show quoted text -
[jQuery] Hovering over jQuery retrieved HTML
Hello! I'm using jQuery to build a form dynamically. Here's how it works: You are presented with an input box. When you focus on the box a dropdown list appears that you can click on in order to insert the chosen option into the input box, or you can use the keyboard arrow buttons to select your choice. When you move to the next input box the page makes a call via AJAX to grab information for the input box based on the previous selection. The problem is that the .hover() function doesn't seem to work with the information that has been pulled into the document using jQuery (it works fine with the first list). The items that are pulled in are all list items (li{name}/li). Using keystrokes works on the items, just not mouse gestures. Would this be a jQuery bug or is there something I can do? Many thanks, Charles