jquery

jarring toggling effect

I have a fixed height div which looks like following. 2 issues. 1 - when I click the 'on_click"show_hidden_div' it does show the div but since the parent div is fixed height, I just get a scrollbar and now the user has to scroll down, any way to automatically scroll down when the hidden div is show? 2 - When the hidden div is hidden ag...

How to fadeOut a label inside a update panel with jQuery in Asp.Net?

Hi guys, I have this label that i want to fadeOut after button event clicked. I am using a MasterPage. And the Script Manager is declared on MasterPage. In Defaulst.aspx i have: <%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %> <%@ Register ...

jQuery via Google CDN best practices

I'm loading jQuery via Google's CDN using the following code. My main question is what will happen if a user hits my site and hasn't yet got jQuery pre-cached. Will he download the Google version and my own? How does concurrency here work? <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min....

How to find if table cells don't contain xx

I'm looking create a piece of jQuery logic that answers: Are there any tables cells that don't contain '' or 'xx' and don't have the class 'yy' This is my effort - but it seems really messy?: $('td').filter(function(index) { return !$(this).hasClass('yy') && !($(this).html().trim() == '' || $(this)...

Javascript events

Hi folks, I am completely confused here. So I am looking for a solution for the following problem: I want to trigger some function(for now an alert box) using jQuery on an input field. Conditions are: Input field always maintains the focus. Input is fed from a USB device, which acts just like a keyboard input. So for 10 characters, t...

jquery use variable in string for appendTo

How can I append this URL variable to the list? I am fiddling around with this: http://jsfiddle.net/Y2ER7/4/ JS: $(function() { var pic = "http://jqueryui.com/demos/droppable/images/high_tatras3_min.jpg"; // doesn't work $("<li><img /></li>").attr("src", pic).appendTo("#album ul"); $("<li><img src='pic' /></li>").appe...

jquery wait for .animate then go to anchor location

I'm using jquery animate to slide a div off the page, this works fine but i would like to change the animate to: only happen once(because if somebody double clicks it, the div comes back), and wait for animation to finish before the href is followed. This is the code that performs the div slide: $(".choose").click(function(event) {...

combo-box-drop-drop-list-remembers last "x" choices, width is settable to less than contents

Hello, before developing it ourselves, we are looking for a combo-box-drop-down-list with the following optional features: combo-box can be programmatically turned on/off drop down remembers the last x (x set by program) user selections and displays them at the top of the drop down list, so that the user does not have to scroll through...

IE8 CSS Hover Image Not Clickable JQuery

Hi Everyone! I have an image which is has an onmousedown event . When I hover over it, it displays a seperate image. My hover code looks like this: $(".baur").hover( function () { $(".hoverbaur").show(); }, I've been using this cod...

Problem submitting file content in Internet Explorer

Im submitting my file through jquery by using Jform.js plugin and its working in Firefox but when i try it on IE8 file properly sumbitted but file upload control gets hidden and further more when i comment IE condition then the file upload control doesnt get hide but when i check Request.Files[0].ContentLength in my controller it have 0 ...

jquery selector help

I have a div with an id="my_div". How can I find a <select> by name (i.e. name="my_select") assuming that the <select> can be at any level underneath the div? I.e. it can be a child, grandchild etc. Ultimately I need to get the value of the selected option. ...

Can I centre a jQuery UI dialog to a div?

I've got a main content div, and I'd like to centre the dialog to that div, rather than to the page. Any ideas? I know there's a position utility, but I can't work out how to use it with the dialog position options. ...

Problem retrieving values from JSON object

Hi Guys, I am having a little trouble retrieving the values from a JSON object that is returned after a jQuery GET request and I am hoping someone here will be able to help. I think I may be doing something stupid but cannot figure it out. In firebug the response is show as: [{"plan_id":"2","plan_name":"plan 2","plan_desc":"plan 2 des...

jQuery plugin Roundabout not scaling text in Opera

I've extensively tested the jQuery plugin Roundabout and got it working nicely in Internet Explorer 6 through 8, Chrome and Firefox. We would like to support Opera as well. However it does not scale text in moveable items moving to the back. I'd rather not post a link to my site yet. But the 'official' example has the same bug. The smi...

Problems with using the jQuery watermark and rails validations...

Ok so i have a text field that uses this jQuery watermark plugin which is really easy to implement. The problem comes into play when i need to validate this field with a rails validation. For example.. def validate errors.add(:price, "should be at least $0.01") if price < 0.01 end I am using the plugin like this $("#request_pric...

jQuery: Why 2 ajax GET requests instead of 1 request?

Why http://jsbin.com/ogilo/3#http://bit.ly/cKnMc2 has 2 ajax GET requests instead of 1 request? It has requests http://bit.ly/aHW5jy and http://bit.ly/cKnMc2 one after other. It must have just 1 request. Editable code in http://jsbin.com/ogilo/3/edit You can check the bug in Firebug console ...

jQuery ajax callback problem

I've been using ajax functions like $.post() using jQuery 1.3.2 and was successfull till today, when I switched to v1.4.2 after downloading jquery UI (jquery-ui-1.8.5.custom.min.js) for using jQuery UI's radio buttons ($( "#radio" ).buttonset();), which wasn't working with the my version (it said .buttonset()is not defined). After switch...

jquery (or js general) splitter with dynamic height

There are some ready JavaScript (jQuery) splitters, but they require panels height to be set. The problem is, that my website doesn't support fixed height, it just can't. Other thing is that this container can change it's height dynamicly, so I'd like to this splitter to adjust to the panels height. Is there a script or a way to avoid t...

Issue applying DD_belatedPNG png fix on images within a lightbox (IE6)

I am trying to invoke the DD_belatedPNG fix on images within a lightbox once it has been called. Okay, so that's easy enough with colorbox: $(el).colorbox({ ... onComplete:function(){ DD_belatedPNG.fix('#product_pop .fixme'); } }); This works fine, and the pngfix is applied BUT it only works the first time the lightbox is ca...

Example combing jquery drag and drop and tabs

Hi all. I have seen some good examples of how to use jquery to do drag and drop and separately on how to do tabs. Does anyone have or know of an example that combines the two? Basically say you have a div on the left of the screen with draggable objects and then you can drop them into one of the tabs on the right side of the screen. ...