jquery

Using JQuery to bind "focus" and "blur" functions for "window", doesn't work in IE

I need to use JQuery like the follwoing: var focusFlag = 1; jQuery(window).bind("focus", function(event) { focusFlag = 1; }); jQuery(window).bind("blur", function(event) { focusFlag = 0; }); Does anyone know why this doesn't work for IE? ...

jQuery plugin to display "loading" while waiting for AJAX response.

I am written some jQuery ajax code where I am sending a request to the server when a drop down option is changed. Based on this change 4 or 5 text fields change their data and bunch of new images get loaded. everything feels nifty. But I was wondering if there was a plugin provided by jquery that would make the page dark...show 'loadin...

How to make resizeable box go from left to bottom as well as right to top.

Ok, so I am working on building my own catalogue of some sort. I am working on making a selecting tool to choose a part of the image to see up close. This is where I am currently working on it Anyway, I am missing something in my logic as far as how to make the box resize when I drag from the bottom right corner to the top left. I kn...

can someone tell me why success callback is unavailable when $.ajax POST request is run inside an iframe ?

can someone tell me why success callback is unavailable when $.ajax POST request is run inside an iframe ? the data is submitted without error. Firebug reports no problems. Yes, iframe and main page are on the same domain. ...

How do you have a floating/fixed element on a web page depending on which part of the page is visible?

The question is confusing, I know, but I just couldn't put it any other way. Here's the url: Configure - Apple Store (U.S.) The 'Summary' box on the side is aligned below the sub-header (with pictures of all the Mac models) and is at the same height as the content block. If you scroll the page up, the whole page goes up as expected. Ho...

How to trigger a rebind of gridview from javascript or jQuery on markup page?

Is there a way to trigger a GridView rebind from an html markup page using jQuery or jscript? I have an ActiveX download control which passes all events via jscript. So, a have a download complete event on the markup page but not the code behind. Thank you, James Here is the main aspx page: <script type="text/javascript"> ...

best way to animate canvas shadowBlur with jQuery?

I'm very much a noob so please forgive me if there's a "duh" solution here. Is there a good, or at least a simple, way to animate things like shadowColor or shadowBlur with jQuery? E.g. If I have something like: function draw(){ var canvas = document.getElementById(elem); if (canvas.getContext){ var draw = canvas.getContext('2d'); ...

What are the main concerns when generating client-side JavaScript from the server?

This seems like a somewhat common issue and I'm wondering what the common pitfalls, best practices, best approach, security concerns, etc., are when creating javascript on the server to be later loaded client side. FWIW, I'm doing this in Ruby and I'm using JQuery as well. It's basically a form builder. Here's what I'm doing: I have an...

KeyBoard Navigation for menu using jquery

I am trying to add keyboard navigation to Menu(ul li based ) , i have bound the keydown event to menu (or should i bind keydown to the document ?) the handler function used is given below KeyDown: function(e) { var toFocus = false; if (e.keyCode == 38) { toFocus = $((e.target/* li */).next()[0]); ...

How to select within a container with jQuery?

<div id="container1"> <span>...</span> </div> <div id="container2"> <span>...</span> </div> Say if I have get the jQuery object $('container1'),how to find the <span> in it? ...

How to check visited link using jquery without using any plugin

How to check visited link using jquery without using any plugin please help to solve this problem ...

Not in DOM after $.load() with jQuery?

var id = 'test'; var dom = $('#loader').clone().load("Views/chatBox.html"); dom.find('span.bn').text(id); in chatBox.html,there is : ... <span class="bn">AAA</span> ... I want to replace "AAA" with "test",but failed(dom.find can't fetch it),which mean it's not available instantly. How to do it the right way? ...

Will the listeners be removed when we call $.remove() in jQuery?

... There are listeners on $('#target') and its children. When we call $('#target').remove() to delete it from DOM,will the listeners be removed? If not,how to remove them together? ...

How to operate on a certain element when blur?

When focusing,we can do something like: $('#target').focus(function(){$(this)..}); Because "this" is just the one that's focused($(this) == $('#target')). But can't do the same for "blur",because $(this) != $('#target'). How to do it the right way? NOTE: in my application,I can't assign an id to the target,and '#target' here is jus...

Looking for new jQuery animation snippets

I'm looking for alternative ways to show/hide objects in jQuery. I.e. such as slideIn/Out, fadeIn/Out, etc. In particular, I'm after a plugin that shows/hides an object from the center and grows outwards, or reversed. Would also be great if it supports the various easing options. ...

What's the standard color definition for different browsers with jQuery?

I need to blink between two colors:red and white. I've found that after $targetcss('background-color','red'), value of $targetcss('background-color') is not red,but rgb(255, 255, 255), pay attention that there is a space between "," and digit in firefox, but there is no space in IE. And my code is now : if(existingBgColor != 'rgb(2...

Jquery simple photo manager demo - recycle trash completely

Hi, I'm using the Jquery's simple photo manager just as it is and it's working properly. http://jqueryui.com/demos/droppable/photo-manager.html All I need is the possibility to recycle all the elements from the trash by a single click. Sounds simple but I couldn't get it so far. Ok, I'm a newbie to Jquery. Help would be appreciated! ...

Geewax jQuery checktree code issue

I have a small display issue when using Geewax's jQuery checktree functionality that has baffled me and I am wondering whether you can help me out or point me in the right direction. I have replicated the page locally on my pc and ensured all the necessary images, css file and js files are within the folder. The list of top level collap...

jQuery: get immediate next element after the current element

Hi i need set focus to the element that is immediate next(and in other case immediate prev ) to the current element eg <li>item1</li> <- prev element (get this element) <li>item1</li><- current element <li>item1</li> <- next element (get this element) <li>item1</li> this is what i used var curr = (event.target).next()...

Why is REL not detected in a jQuery attribute selector

If I use the following selector I get no results $(".itemSearchModule .cmsItemList[rel='myRelValue']") for the following html snippet <div class="itemSearchModule"> <ul class="cmsItemList" rel="myRelValue"> <li>something</li> </ul> </div> MISTAKE I was using firebug to debug the code and it seems that using that code ...