jquery

How to keep div focus when the mouse enters a child node

Hey, So I have this page here: http://www.eminentmedia.com/development/powercity/ As you can see when you mouse over the images the div slides up and down to show more information. Unfortunately I have 2 problems that i can't figure out and I've searched but haven't found quite the right answer through google and was hoping someone cou...

Create onDragEnter custom event

Hello, I was experimenting with the onDragEnter event and realized it only works in IE. How can I recreate this event using jQuery, so that I can get information about what is being dragged, etc.? For example, I'm trying to drag some random text over a box that can recognize what the text is, etc. I also need to be able to drag some ra...

Create droppable area that can accept random text/images

Hello, I'm trying to create a droppable area that can accept random text, images, or text and images. I know how to create a droppable in jQuery, but it only accepts items that are explicitly declared draggable. All I want to do is highlight random text, images, or text and images using my mouse in the browser and drag it (imagine high...

jQuery UI tabs disable tab navigation

I tried to disable tab navigation using var $tabs = $("#tabs").tabs({ select: function(event, ui) { return false; } }); However, this also disables the flow links I'm using for navigation: $('input.nexttab').click(function() { var tab_num = $tabs.tabs('option', 'selected'); // error check this tab before proceeding if...

Set Image Opacity Problem

Hello, I have a little design problem. On this page I have a couple of mouseover images. As you can see (only in IE) the images are circled with black when setting the opacity. I do not have this problem in firefox. The reason I use opacity, is because when I use hide/show the image, the table where it resides in gets shaky. Can an...

Transversing the DOM in jQuery

I have a bunch of these little bits of HTML code repeated over and over again: <div class="collapse" id="any_mins"> <fieldset> <legend><img title="Click to expand" class="plus" alt="+" src="" />Heading</legend> <table class="mins_table"> lots of rows and cells go here </table> </fieldset> </div>...

JQuery - AJAX dialog modal, can't hit enter key to submit form

On a website I'm working on, when you click sign on, a jquery dialoge modal pops up, but you have to click on OK to submit the form, you can't just hit enter. I need it to be able to have enter work also. It seems like what I have should work, but it doesn't I'm using jquery-1.3.2.js. I also have a php file with the following piece of...

$.getJSON scope problem

$.getJSON('http://twitter.com/followers/ids.json?screen_name=' + query1 + '&callback=?', function (data) { console.log('JSON data string 1 is: ' + data); $.getJSON('http://twitter.com/followers/ids.json?screen_name=' + query2 + '&callback=?', function (data1) { console.log('JSON data string 2 is: ' + data1); f2 = ...

How do you know you have to use function() {}?

code 1 $(document).ready(function() { $('.poem-stanza').addClass('highlight'); }); code 2 $(document).ready( $('.poem-stanza').addClass('highlight'); ); ...

treeview with Checkbox - MVC

I need to show a treeview with checkboxes to select in MVC with C#. I have two tables. one with categories and subcategories and the other one with products. Some categories wont have sub categories in the first table, they'll have only products. I need to populate the Treeview with these two tables. Please suggest me to do it in MVC a...

How can I recreate the ImageKit Picture Taker?

Hi, I'm trying to create a tool for jQuery which crops images. I know there is already a load of already. The difference with the one i'm trying to make is that i'd like it to act like the Picture Taker interface found in many mac applications like iChat and Adium. I'm stuck completly on how to do it. Can anyone give me any ideas? Pictu...

JQuery - Copy dimensions and absolute position of element

I'm trying to copy a element's dimensions and the position(relative to the document) onto another element. Ex: var SelectedElement = $("div#MyTargetElement"); // The CopiedButEmpty element is a div with absolute position that is meant to hover/float above the selected element. $("div#CopiedButEmpty").css("width", SelectedElement...

Using the JQuery Ajax function to Return 2 Sets of Data

I'm using the JQuery AJAX function to deliver data to a PHP doc. Currently, the AJAX success function returns HTML which gets added to the html page. My goal is for the success function to return a second/different piece of data that can be used as a JavaScript variable. How can this be done? Update The question was answered correct...

jQuery advice: How can I improve this function for scrolling elements into view?

I've created a function that scrolls a given child element into view within its parent. It goes as follows: function keepScrolledOver( elem ) { frame = elem.parent(); var scrollPos = frame.scrollTop(); var offset = elem.attr( "offsetTop" ); // If the element is scrolled too high... if( offset < scrollPos ) { frame.scrollTop( ...

jquery hidden parent

ummm, probably a simple one... the code below only works with visible (show()) elements how do I get it select the first hidden element instead? Jquery $(".postSelectedRules").each(function() { $(this).parents("#idruleB-"+$(this).attr("id").substr(8)+":hidden:first").css('background', '#bbbbbb'); }); Html <a id="idruleA-1" class...

jQuery question: Does using .remove() also properly remove children?

Not that it matters strictly, and maybe I just don't yet fully understand how the DOM works by asking this, but I'm just trying to anticipate if there is some kind of memory leak potential here. If I remove an element that has children, event listeners, etc., do those get cleaned up as well? Or would I be wise to implement some kind of...

How do you use POST with jQuery Autocompleter?

jQuery v1.2.6 jQuery.autocompleter plugin v1.1pre (from jQuery's website) I am not able to submit with 'type: "POST"' back to my webservice. I can't get it to be recognized by the autocompleter. Thoughts? This code below works fine, as long as I look for the "q" querystring. But, I would like to use this for more advanced features ...

Jquery img.load question

Hi, I am using the jQuery cycle plugin to cycle through some images. These images are all contained inside a DIV. I don't want the cycle plugin to run until after all of the images have loaded, or at least the first 4 or 5 so that an image doesn't appear that isn't loaded yet. Is there an easy way of doing this? I tried adding a cla...

jQuery UI -> handling dynamic content?

Hi, I'm trying to use a dynamic, single dialog that changes based on ajax calls. Is there any elegant way to change the height and width based on the new content? Currently, I have an empty div which is filled, causing problems. Help? ...

How to edit the resulting html of jQuery UI tabs ?

Hello I have some tabs using jQuery UI which work just fine, but I want to edit the resulting html to add some stuff on/around it, more precisely I would like to add a left panel and some icons at the right side of the header. Trying to give you a schema, here is what I have: tab1|tab2|tab3 content content content content content cont...