jquery

Pass in 2 parameters for a jquery function

Hello I have this function that works, but I would like to make this one as a general function so I can pass in 2 variables. <script type="text/javascript"> $(function() { $(SOME_ID_HERE).click(function() { if (confirm(SOME_ERRORMESSAGE_HERE)) { $.post(this.href, function(data) { ...

ColorBox over Flash in Firefox, Vista

Hi I am using ColorBox over a Flash file which works just fine in all browsers on all platforms except for an annoying behaviour in Firefox on Vista. On calling ColorBox it pops up and displays the loading graphic fine, but once the content has loaded the ColorBox window resizes and then stalls for up to 10 seconds before showing the co...

Jquery $.ajax() call to webmethod

Hi, I have never before used the $.ajax() and if you see any mistypes let me know ;) Im using jQuery $.ajax() to call a webmethod with JSON. The simple definition of the webmethod should look something like this: [WebMethod] public static bool MyMethod(string a, string b, string c) { ... } The value for the data parameter in $.a...

IE jQuery Opacity Anti-Aliasing Issue

I am using jQuery to fade in and out a .png images of links on the home page of http://www.logandwight.com In IE7 and IE8 the text have no anti-aliasing and are all boxy. I've tried messing with the opacity settings and then I tried animating the filter property specifically for IE but nothing seems to work. Does anyone know whats wron...

Manipulate all elements except the one currently clicked

I wanted to know if there's a way to alter child elements while isolating the one that is currently clicked, so far I have a simple traversal with a click event handler inside as follows: $(function() { $(".hd").children("ul").children().each(function(){ $(this).click(function(){ alert('Handler for .click() call...

Making an Ajax form from an Ajax request in jQuery

The client is making a request to the server. I need to take part of that request, and make the form button work with Ajax. This piece of code works perfectly for links: var pagination_render = function() { var pagination = $('.pagination a'); pagination.each(function() { $(this).click(function(event) { load...

Serving images with JavaScript on a website

I'm trying to find different ways to serve images on a web site. The most straight forward is obviously to use the <img> tag. What other methods exist? I like the way images are served here: When a user clicks on the image, a larger version is presented and the surrounding screen darkens. There are also 'next image' and 'previous ...

How do I use a jQueryUI Dialog for confirmation?

I'm trying to use the jQueryUI Dialog to get user confirmation before a database update, but I'm battling to see how I can tell what the user's choice on the dialog is, as all in samples I can find, both buttons just close the dialog, with no persistence of the chosen button. E.g. from the jQueryUI sample and docs: buttons:...

How can you implement a jQuery feature without having IE prompt users with an Active X warning?

Essentially, I want to implement a jQuery feature on a site that I'm building, but I don't want Internet Explorer users to have to click "Allow Blocked Content". The feature works fine with Safari, Chrome, and Firefox. It's only IE that prompts the users with the Active X warning. I'm using the following jQuery cycle plugin: http://mals...

How can I achieve jQuery animation queuing?

Possible Duplicate: jquery finish one animation then start the other one I've got a set of divs loading via ajax (we're talking about 6 divs, representing 6 products). What I'm trying to accomplish is a progressive animation, like a jquery.fadeIn() per div, after the animation of the previous div has finished. What would be t...

jQuery, XML as a String, and IE

Hello everyone, I just inherited a project where the main navigation menu is currently Flash. They asked if I could switch it to javascript, so I agreed to give it a shot. The navigation structure itself is dynamically generated on the server and new nodes are picked via an ajax call. The return is all XML. To prevent delays on initia...

ASP.NET MVC error page content inside JQuery populated DIV

I have a pagination control that refreshes a DIV via some JQuery Ajax, however if and when an error occurs say if the page crashes because it couldn't connect to the database or some other reason. My default error page gets displayed inside that DIV instead of the results.. So my question is how do you make it so that doesn't happen, th...

Having a problem with selectors

The problem I'm having is not being able to select the divs inside the 'menuItem' class divs. I've tried using the jQuery selector to select by both class and even ID, but every time I try to do anything with it, such as an animation, nothing happens. Is there some jQuery law I don't know about that prevents me from doing so? $('.menu')...

jQuery, toggling div, CSS spacing issue

I have this markup: <div class="myToggledDiv"> <div>content</div> </div> <div style="margin-top: 10px;"> content </div> Via jQuery, I'm doing a .slideToggle to show/hide the top div. I'd like there to be the 10px space between the two divs at all times, whether collapsed or expanded. The behavior, however is that as the to...

Why isn't this javascript working?

I can't get this to work. It refreshes the page as 'undefined' so I can't even troubleshoot with Firebug. Can anyone point out to me what part of this would be returning undefined? var locations = { 'us-lax': { 'name': 'Los Angeles' }, 'us-nyc': { 'name': 'New York' } }; // this is the order in which they'll appear var ...

jquery ajax php recordset caching

Hi, I currently have a jQuery/ajax request which produces a recordset which appears in #contentDiv on my page. The user can then browse the results and view further details of an item. Once on the page for the item it the user hits back on their browser they return to the default page for my search without their generated search resul...

Adding extra input fields when I need them

I trying to create an HTML/CSS/JavaScript based list manager. I'm using text input fields as my individual list items, with the first text input field being: <input type="text" id="input1" value="Enter your first item" /> I'm using jQuery to create a new text input field if I've used the previous text input field: <input type="text"...

IE 7 + jquery 1.3.2 errors

I have the following code in my page. Sometimes the jquery is loading fine but sometimes i get an error: jQuery is undefined <script src="/javascripts/jquery-1.3.2.min.js" type="text/javascript"></script> <script src="/javascripts/jquery-ui-1.7.1.custom.min.js" type="text/javascript"></script> <script type="text/javascript"> alert...

Set backcolor of row based on a DATE in a cell exceeding another date

Given a table with a column "DueDate", what would be the approximate jQuery code for say, setting the backcolor of the table rows based on the value of each DueDate cell with respect to another date? I am most specifically interested in the pitfalls involving how to properly handle the dates....how to consume a string value explicitly a...

Issue with hover events and parents

So let's say I have a block of nested divs: <div class='nested'> <div class='nested'> <div class='nested'></div> </div> </div> I want this kind of behavior: Hover on a div. That particular div changes background color, and its children don't. Hover on that div's child. Again, it changes color while its children don't, AND(impor...