jquery

jQuery object undefined

Apologies for asking what's probably a very obvious question, I've been banging my head against this all day + I'm very new to JQuery and JavaScript in general. I'm running the following:- <script type="text/javascript"> $(function() { $.getJSON( "http://query.yahooapis.com/v1/public/yql?q=select%20*%20from%20yahoo.finance.quotes%2...

jQuery: Temporarily change a style then reset to original class.

Say I have a class named testThing: .testThing { background-color:#000000; float:left; height:50px; width:50px; } And I want to be able to test a background color change to whatever control is of that class on a button click: function setColor(someColor) { jQuery('.testThing).css('background-color', someColor); } Bu...

jquery for xml parsing

Hello folks, I am trying to use jquery for xml parsing. Snippet of my XML is as follows <ex>Some text here <it>some italic text</it> some more text <it>text more </it> text text <it>some more italic</it>go go</ex> I want to get the text within and tags and display my content as follows Some text here <i>some italic text</i> some...

using the jquery validation plugin, how can I add a regex validation on a textbox?

Hi, I am using the jquery validation plugin from: http://bassistance.de/jquery-plugins/jquery-plugin-validation/ How can I add a regex check on a particular textbox? I want to check to make sure the input is alphanumeric. ...

jQuery not working with Html.ActionLink?

Hi guys, I know this is wierd, but I am using ASP.NET MVC, I have real simple jQuery on 2 views. One view is the Home page and the other is an item details page. This page is opened using an Action Link on Home Page. The jquery on item details page does not fire at all. $(function() { alert('Fired!'); $('#contact').hover...

Multiplying field value with retreived value jQuery

I pull product price from another page. Then I multiply it with quantity entered in the quantity input field. The problem is, if I forget to enter quantity value before I pull product price data or if I change the quantity field later, the final total price is not updated. I hope I clearly explained it. javascript: $('#AddProduct').cli...

How to change form text with Jquery but keep it when filled by user?

Hi! (I hope my title is comprehensible, it was hard to sum up.) I have some script which change some text inside a form depending on the selected radio button as you can see here: http://jsbin.com/onowu/ The problem is that if some user enter some text and then click on a other radio button it will remove his text. What I'm looking f...

Does duplicate id's screw up jquery selectors?

If I had two divs, both with id="myDiv" Would $("#myDiv").fadeOut(); fade both divs out? Or would it fade only the first/second? Or none at all? How do I change which one it fades out? Note: I know duplicate id's is against standards but I'm using the fancybox modal popup and it duplicates specified content on your page for the conte...

How to convert a Title to a URL slug in jQuery?

I'm working on an app in CodeIgniter, and I am trying to make a field on a form dynamically generate the URL slug. What I'd like to do is remove is punctuation, convert it to lowercase, and replace the spaces with hyphens. So for example, Shane's Rib Shack would become shanes-rib-shack. Here's what I have so far. the lowercase part was ...

Jquery Horizontal Accordion Webkit Bug

I'm trying to build a horizontal accordion with Jquery. It seems to be working "ok" in Firefox. But in Webkit (Safari 3 + 4, and Chrome) the sub-level UL flashes after the Hide function. Any help would be greatly appreciated. To see a working demo: http://ableobject.com/horaccordion1.html Here is what I'm working on: <html xmlns="ht...

Javascript Double-Click Element

Hey guys.. Quick question: I wrote a simple JS that opens lightBox for image viewing when an image link is clicked. Basically, using jQuery (yes, I was that lazy), I detect the click of an anchor tag, use a regex to make sure that the HREF attribute is to an image file, and if it is, it opens the image in lightBox. It all works fine, ex...

jquery show slide bug

The desired effect is for the panel to change depending on which #button you click on. This works fine. The only problem I have noticed is that no matter what #button you click, the settings panel is the one that slides by. I tried to have a global var and store the prev panel, but that was not working at all. I believe the problem l...

C# Adding callback to JsonResult

My mvc page returns json by using the function Json(mycustomclass) to return a JsonResult object. This works just fine except, I need to wrap the json in a callback so that jQuery can use it. I want it like this: jsonp1246168411282({"myjson":"some values"}) but I am getting this: {"myjson":"some values"} Is there any way I can 'wrap'...

iframe's onload event not firing in firefox (related to ASP.NET file uploading)

Main Page: <iframe src="/files/new" onload="alert('onload');"></iframe> and inside the iframe, /files/new renders: <form action="/files/create" method="post" enctype="multipart/form-data" > <input type="file" name="file1" size="28" /> <input type="submit" value="submit" value="Submit" /> </form> If I submit a file, iframe's...

Critique on jQuery Use

I'm busy introducing myself to jQuery by implementing a little system where onmouseover on an element causes a text balloon to pop up close to the element. I feel like I'm using too much vanilla JS here, so please suggest where I can improve and what is wrong with this code: <head runat="server"> <script type="text/javascript" src=...

loader problem

Hi, I want to know whether it is posible to have loader which will run till all the images in the page been loaded to the page . I have a website http://ranjoy.athost.net/ which is having some png large size images, i want all the images to load before the animation start .... plz help ...

How to get XML structure with jquery?

Is it possibble to map the structure of an xml file with jquery? After an ajax call the client gets an xml file, but it doesn't know the file's node structure, how could we reach all of its content? Thanks edited: For examlpe this xml has changing node structure. How could I reconstruct the exact node structure with jquery? <?xml versi...

multiplying input fields within a listview using jquery

I have a listview with lists lines of an invoice (Which are editable), each invoice line has a qty and a rate and I want to show the line total on the client show so if the qty or rate is changed the total changes before the postback. I have applied the below which gives the right result but doesn't work with multiple line items. The qt...

jQuery cycle plugin, centering image in div

Hi, I'm looking to use the JQuery cycle plugin to cycle through a set of images. All of the images are different sizes and I'd like them to all be centered inside the container "slideshow" DIV and use the "Fade" transition, rather than the default top left. I have added a 'Before' callback, where I set the Top and Left of the object...

jquery tablesorter disables submit functionality

Hello, I've got a table which Im sorting with tablesorter (http://tablesorter.com). Within that table there is a column with submit buttons. Each table row has got a submit button. Before sorting, the buttons work great and submit a POST request which is processed by a PHP script. AFTER sorting the table with tablesorter the buttons se...