jquery

.focus() doesn't work on an input while orher attributes works

I have a classic table / thead / tbody structure, which I add a line at the end of the tbody. The line contains only an input element. The code works in Firefox 3.6 but not in Chrome v5 or IE8. I'm using jQuery 1.4.2. Does not work: $("#" + AJAX_ID).parent().find('tr:last > td:nth-child(2) > input').focus(); Does work: $("#" + AJAX_ID)...

JQuery - Form Submission

Hello, I have a web page that has a DIV and an IFRAME. When a user clicks a button in my DIV, I need to submit the web form that is hosted in my IFRAME. Both pages are hosted on the same server in the same directory. My code that attempts to submit the web form looks like this: $("#myIFrame").contents().find("form").submit(); When th...

JQUERY UI too much space from the top border to the haeder ...

I am trying JQUERY UI but I have a problem; the distance form the top of the border of DIV is too much even if the padding is 0. What can i do -> he theme is "smoothness" but I don't think it is a problem of the theme. Thanx for your help Alex function themify(){ $("div").addClass("ui-widget ui-widget-content ui-corner-all"); ...

Why doesn't combining has() and gt() work in some cases?

I wanted to select any ul which contains more than 3 lis. This code worked with the 1.2.6 jQuery library: $("ul:has(li:gt(2))") .each( function() { $(this).css("border", "solid red 1px"); }); But not 1.3.2 or 1.4.2. This code worked with the 1.4.2 jQuery library: $('ul').has('li:nth-child(3)').css('border', 'solid red 1px...

Javascript context menu for images

I have a website where lots of people copy images off it, which is fine. What I do want to do, however, is help them embed it on the target website they are going to. Ideally this would take the form where when a user right clicks the image a context menu will appear giving them easy options to embed or share the image. What is the be...

Setting <td> value using jquery

Hello, I have the div structure shown below. For the second <td> in the table i want to replace &nbsp; with a hyperlink whose href attribute is stored in the variable myLink. How can i do this with jquery ? Please help. Thank You. <div class="pbHeader"> <table cellspacing="0" cellpadding="0" border="0"> <tbody> <tr> ...

How do I make a checkbox in jQuery lock a existing sliding window from moving and then unlock it by unchecking the box?

I`m very new to jQuery but am starting to get the hang of it. My Question is: How do I make a checkbox in jQuery lock a existing sliding window function from moving and then unlock it by unchecking the box? So basically enable/disable a existing function in my project called - #navigate Any help would be greatly appreciated! ...

jQuery animations are choppy and stutter in Firefox

I like to think I'm not a dummy, but I can't get my jQuery horizontal slideshow to animate smoothly especially in FireFox (on a Mac). Anyone have advice? Animation is being done like so: $('#lookbook').stop().animate({left: -((lookbook-1)*825)+'px'}, { duration: 800, complete: cap_fade(1)}); Example link: http://mayfourteenth.com/w/...

Display 2 weeks in view calendar

Is there a way to display only 2 weeks using jquery full calendar? ...

Show information over image on rollover

I want to be able to show information (HTML basically) over an image when the mouse rolls over the image... I know there is a .hover() jQuery function but am unsure how to use it to get the desired effect. Ideally when a user hovers over an image it would "grey out" (e.g. layer of 50% opacity black) with some HTML like a title etc etc. ...

Drupal 6 Imagefield and some sort of jquery callback when the field has uploaded

Hi all, I'm totally stuck trying to find a way of moving the imagefield preview of a Drupal 6 cck form to another div on the page. The desired process using a cck form and some javascript: click browse, click upload, imagefield widget uploads the file then creates a an image preview. Once this is done I need to triger a javascript func...

Debugging site written mainly in JScript with AJAX code injection

Hello, I have a legacy code to maintain and while trying to understand the logic behind the code, I have run into lots of annoying issues. The application is written mainly in Java Script, with extensive usage of jQuery + different plugins, especially Accordion. It creates a wizard-like flow, where client code for the next step is down...

Chaining jQuery animations using recursion crashes browser

Here's the basic idea of what I'm trying to do: Set the innerHTML of a DIV to some value X Animate the DIV When the animation finishes, change the value of X and repeat N times If I do this in a loop, what ends up happening is, because the animations occur asynchronously, the loop finishes and the DIV is set to its final value before...

jQuery: Trouble inserting DOM elements

I want to add a set of lists to the children of another DOM element: var req_subsets = $("#req_subsets"); $.each(subsets, function(index, subset) { var subset_list = $("<ul></ul>"); // add DOM elements to subset_list req_subsets.append(subset_list); }); However, only one DOM element is ever adde...

Does IE completely ignore cache control headers for AJAX requests?

Hello there, I've got, what I would consider, a simple test web site. A single page with a single button. Here is a copy of the source I'm working with if you would like to download it and play with it. When that button is clicked, it creates a JavaScript timer that executes once a second. When the timer function is executed, An AJAX ...

Cannot see changes made to aspx

I'm trying to edit an aspx page...mainly javascript, and I randomly see changes that I've made when refreshing. I'm using jquery, but I'm not sure that jquery is the culprit here. For example. If I add a simple alert("hello"); in the page I'm calling, I do not see it take place until I have cleared all my temp files and cache, closed ...

jQuery UI Droppable: Detect which draggables are dropped on an element?

I have the jQuery UI framework's draggable and droppable elements working. I would like to programmatically determine which draggable elements are currently dropped on which droppable elements. Is there an easy way to do this? I thought of using event listeners to detect drop and out events, then keep a dictionary or something in memory...

jQuery slider ui -- dynamically set starting value from HTML element

I am trying to read the value of my slider from a DIV element's title (which may be the issue). That is pushed into the following: $(document).ready(function() { $(".myslider5").slider({ min: -1000, max: 1000, value: parseInt($(this).attr("title")), slide: function(event, ui) { // more a...

jQuery character counter inside newly created tooltip

I'm having a difficult time figuring this one out. I'm attempting to have a user open a tooltip (using jQuery qTip). What this does is create a "new" tooltip element on the page; it takes it from an existing hidden HTML div on the webpage. Once this new tooltip is created, it has a character counter that is supposed to dynamically up...

jQuery: Selector confusion

What is wrong with this jQuery selector? $("#masterHeaderMenu.masterHeaderMenuButton a:first") I'm intending to select the first anchor tag that is a child of an element whose class is "masterHeaderMenuButton", itself a child of the element with an "id" attribute value of "masterHeaderMenu". Can't I do this in jQuery? ...