jquery

jqZoom IE 6,7 (8?) bug

If on this product page you click on the second or third thumbnail, while using IE 6 or 7, the zoom function breaks. I think when you view the error in IE7 you can understand a little better what's going wrong. But to tell the truth, I have no clue what's going wrong O_o Again, opera, safari, chrome, ff no problemo, whyyyyyyyyy ...

How can I reload a div with a PartialView in ASP.NET MVC using jQuery?

I have a div with a partial inside somewhere on the page. I have a event on a button. How could i write a Javascript that takes the div and reloads it and also reloads the partial view. I have this in another view. But i can't do it like this now. But i need the same thing to happen only execute by a jquery not directly in the page. C...

Updating a text field updates a table cell (per row basis)

I have a table for adding lines to an estimate to send to my clients, looking roughly like this: <table> <thead> <tr> <th>Qty</th> <th>Kind</th> <th>Description</th> <th>Price</th> <th>Discount</th> <th>Tax</th> <th>Total</th> </tr> ...

Optimizing : constructing a jquery collection

I have this Jquery code that construct a collection of jquery objects. It takes around 600 ms to execute. I want to optimize it: var tousBt = $('img.boutonReduire'); var stack = $(''); tousBt.each( function() { var id = $(this).attr('id'); stack = stack.add('#table' + id).add('#img' + id); }); Do you see something that I can...

jQuery: Set focus to field in DIV

What is the proper method to set the focus to a specific field within a dynamically loaded DIV? $("#display").load("?control=msgs"); // loads the HTML into the DIV $('#display').fadeIn("fast"); // display it $("tex#header").focus(); // ?? neither that $("input#header").focus(); // ?? nor that $('#display', '#header').foc...

JQuery in ASP.Net User Control in C#

I'm trying to add some JQuery to an ASP.Net User Control to check to see if checkboxes have been selected or not. It appears that scripting languages are not supported directly in user controls, but need to be added via the RegisterStartupScript() method. I found a post at this url describing this: http://www.codeproject.com/KB/aspnet/...

How to enable thumbnail selection for external links? (or: reproduce Facebook's "post to profile" functionality)

When posting a link to your facebook profile, users are presented with the option to choose a thumbnail to represent the link, as seen in the following example: http://www.everyday.com.my/photo/2009/4/Add-Sushi-King-into-my-Facebook-profile.jpg (New users aren't allowed to embed images) The thumbnails presented to the user are the diff...

Get updated value from a textarea and insert it into a div with jQuery?

Hey there... here's an easy one (that I'm struggling with)! I have a textarea, a button, and an empty div. All I want to do is insert the updated contents of the textarea into the div onClick of the button. Here's what I've got so far: <html> <head> <script type="text/javascript" src="jquery.js"></script> <script type="text/javascr...

Can you cancel a jQuery AJAX call before it returns?

I have a jQuery dialog box that opens and then an AJAX call is made. I would like to make it so that if the dialog box is closed or the cancel button is pressed the AJAX call is canceled and its callback function is not called. I can think of some ways to do it with a variable like so: function doStuff(){ var doCallback = true; ...

Is it possible to drag an HTML element out of another element and trigger a change with jQuery?

I have a container element that you can drag objects around in. I want it it so that if you drag an element out of the container (when the mouse crosses the border of the containing div) the element you're dragging to change. How do I arrange this? $("#container img").draggable({ helper: 'clone', zIndex: 100 }); Once the imag...

Question about TimeZones and Jquery CountDown plugin

Hi I am looking to use this plugin: http://keith-wood.name/countdown.html but I need to use the TimeZone feature of it. So I was looking at the sample code $('#sydneyCountdown').countdown({until: liftoffTime, timezone: +10}); so +10 is the TimeOffSet number. Now I need to make it so I can do a jquery get request and grab the TimeOf...

JQuery in ASP.Net User Control in C#

I'm having problems using JQuery inside an ASP.Net User Control I've created a sample and here is the markup for my user control: <%@ Control Language="C#" ClassName="UC" AutoEventWireup="true" CodeFile="UC.ascx.cs" Inherits="UserControls_UC" %> <span id="Licenses"></span> <script type="text/javascript"> $(document).ready(fu...

How can i inject an object inside a context of a draggable element in JQuery ?

Hi, I use draggable/droppable JQuery feature as follows div.container { height:400px; } <div class="container" id="source"> <div id="0">Item 0</div> <div id="1">Item 1</div> <div id="2">Item 2</div> </div> <div class="container" id="target"></div> $("#source div").draggable({ helper:"clone", revert:"inval...

Why isn't my custom formatResult function called using the jQuery autoComplete plugin?

I'm using the autocomplete jQuery plugin (api doc) that calls a service which returns json. I have the plugin consuming the json result fine and everything works, execpt my custom formatResult function is never called. I'd like to use that function to capture the user selecting from the result list to populate various other fields on t...

navGrid not working with JQGrid

I have a asp.net MVC app and I'm trying to get the jqgrid 3.5 to work in it. My grid does not use paging features but I want to use the page navigator bar for edit buttons. My grid within a jquery tab control on a content page. Displaying my data works fine in the grid but when I add the .navGrid() extension and options to it it breaks t...

switch statement in Jquery and List

Hi, I would like to know if my approach is efficient and correct. my code is not working though, I don't know why. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt; <html xmlns="http://www.w3.org/1999/xhtml"&gt; <head> <meta http-equiv="Content-Type" content="te...

Testing Javascript that Manipulates the DOM

I've been looking into javascript test suites and I have found QUnit to be very interesting. I understand how to test computational code, but... How do you test javascript applications written primarily for DOM manipulation? it seems like testing the position/color/etc of DOM elements would be a moot point because you'd end up doing so...

Using JQuery datepicker with an ASP.NET MVC ViewModel

Hello all, I've been trying to use a JQuery datepicker (calendar) in my asp.bet mvc view. Everything was working ok until I had to use a ViewModel: since I preferred to use the hard-coded object graph (ie <input name="viewmodel.Meeting.Date"...) instead of using a model binder I'm stuck with a script that doesn't work- apparently the JQ...

Uploadify not working

I am using Uploadify and something which was previously working now isn't and I'm not sure why. I get an HTTP error returned whenever I click upload. Watching the net tab in Firefox, it doesn't look like it's even sending anything to the server again. I've tried putting in the error function to help debug but the status attribute is un...

rails and jquery: script displayed instead of execution

Hello there, I'm having a little trouble using jQuery in Rails. I'd like to call the destroy method for a specific list item and then remove it from the list via ajax. My code is pretty simple: # _web_profile.html.erb - The partial containing the link to destroy: <%= link_to 'Remove', web_profile, :method => :delete, :class => 'remove...