jquery

Find text string using JQuery?

Say a web page has a string such as "I am a simple string" that I want to find. How would I go about this using JQuery? ...

I am having trouble changing my images on click event with Jquery

I am trying to swap image when an image is clicked...here is my jquery so far and it's not working. $(document).ready(function(){ imgFldr = '../../App_Themes/Default/Images/'; $('#smallImg1').click(function(){ $('#smallImg1').attr('src', imgFlder+'belkinSmall4.png'); }); }); And below is an example of my HTML <div> ...

How to change the display of this jQuery plugin?

This textcounter and limiter works great, but I'd like to be able to change the display of the "characters remaining" to before the textarea, not after. The developer doesn't respond to emails, so I'm wondering: how do I change this to display the characters remaining to before the textarea, not after? Thanks... The html: <p>Message (...

jQuery UI number spinner event question

Hi, I've been stumped on this problem for over a week :( Any insight into this problem would be hugely appreciated! How do I link a jQuery UI number spinner/stepper (http://wiki.jqueryui.com/Spinner) so that a label text value changes as the spinner value increments or decrements? ... <script type="text/javascript"> ...

jQuery US Currency validation regEx to allow whole numbers as well

I have this regex working but now need to allow numbers without the decimal as well // Validate for 2 decimal for money jQuery.validator.addMethod("decimalTwo", function(value, element) { return this.optional(element) || /^(\d{1,3})(\.\d{2})$/.test(value); }, "Must be in US currency format 0.99"); Currently this forces the user to...

jQuery selector not working within jQuery event

The following code produces function (value) { if (value === undefined) { var elem = this[0]; if (elem) { if (jQuery.nodeName(elem, "option")) { return (elem.attributes.value || {}).specified ? elem.value : elem.text; } if (jQuery.nodeName(elem, "select")) { ...

Sorting jqGrid in ASP.NET MVC client view with jQuery and LINQ-to-Entities

I'm a jQuery noob, so I'm sure I'm missing something simple here. I've got the jqGrid working with an action that creates JSON data from a LINQ-to-Entities operation. But when I click on the column headers in the browser, the rows don't sort. The ascending/descending indicator shows up, but nothing else happens. The necessary JavaScrip...

Remove Values from Hidden Div Forms

Is there a way to remove Form input/select values when you hide a div? Example: Let say i have a form that i fill out. I have a couple different choices, each one will show a different div with a different form and hide the rest. But when i submit, it still submits those form values, even when the div is hidden. Is it possible to remov...

jQuery select the same OPTION on three SELECT drop downs with one action

I have 3 SELECT drop down SELECT 1 <select> <option value="volvo">Volvo</option> <option value="saab">Saab</option> <option value="mercedes">Mercedes</option> <option value="audi">Audi</option> </select> SELECT 2 <select type="hidden"> <option value="Sadan">Volvo</option> <option value="Sadan">Saab</option> <option val...

Formatting data for jQuery Autocomplete results

I have some data which I am formatting like this: // ... imagine populating a SqlDataReader with some results ... var results = new StringBuilder(); while (reader.Read()) { results.AppendFormat("{0}, {1}\n", reader["name"], reader["emailAddress"]); } return results.ToString(); My controller action is pretty simple: public...

Why won't this jQuery function perform properly?

I'm a total noob when it comes to jQuery but I am trying to learn. What in tarnation am I doing wrong here? function MakeCall(url) { var result; $.ajax({ url: url, dataType: "text", success: function(txt) { result = txt; return; } }); alert(result); return result; } EDIT: ok, sorry about that bit of s...

Why won't this jQuery function perform properly? (Revised)

(Didn't mean to create a new question, but revised the old one enough that the answers don't make sense, and now there's a new problem) I'm a total noob when it comes to jQuery but I am trying to learn. What in tarnation am I doing wrong here? function MakeCall(url) { var result; $.ajax({ url: url, dataType: "text", succes...

jQuery and ASP.NET Custom Validator

I'm trying to learn jQuery and it occurred to me that existing JS in some of my sites could be replaced with just a few lines of jQuery code. In the following code, I'm trying to set the value of a custom validator by making an AJAX call. The first block of code does not work as it should, whereas the second block works fine. The whole "...

Dynamically Preloading/Displaying Webcam Snapshots on a Web Page Using AJAX

I have an IP Camera that streams out live video to a web site of mine. Problem is, it is powered by an ActiveX control. Even worse, this control is unsigned. To provide a more secure alternative to the people that are using browsers other than IE, or are (rightfully) unwilling to change their security settings, I am tapping into the c...

Tablesorter: How to continue zebra into the footer

I've got a hard coded HTML table with our little phone list and I've got the empty stations in a footer so they don't get sorted by tablesorter. However, this also excludes them from being zebra striped by tablesorter as well. Is there a way to make tablesorter see the footer for zebra purposes but not for sorting? Or should I just us...

Latest jqModal release: "live" link triggers won't work.

With the latest jqModal release (+r14), I'm having an issue with the new feature of live links. Whenever the live-loaded trigger link is clicked on, it redirects to the HREF instead of loading it via AJAX. How can I make it behave normally? I've searched around and other people seem to have this issue, but it's gone unresolved. $('a.mo...

Jeditable setting default selected value after change.

My app allows the user to update a field via a drop down box using jeditable. When the program is loaded i created this function to get the selected value and set it as the selected value in jeditable. But after i change the value, the selected tag stays set as the old value. how can i make it change to the new value? this is the funct...

jQuery/Javascript - How to fire an event when a button's value is changed?

I am working on a plugin for jQuery that will essentially style certain elements. Like jqTransform I could just replace the element but I chose to position the real element off screen and make a new element thats styled. This allows triggering the actual events of the real element. Also, if an onclick handler or onchange handler for a te...

How do I keep Firefox from prompting for username/password with HTTP Basic Auth with JQuery AJAX?

I'm writing some browser side dynamic functionality and using HTTP Basic Auth to protect some resources. The user experience is very important and is highly customized. Here's a simple test JQuery method that eventually will test if a user has supplied the right credentials in a form: $(document).ready(function() { $("#submit").cl...

How to load jquery "Modal Window" Before Page load?

I'm making a site in two language ,I want to give a "jquery Modal Window" before English page load to give a option to choose another language link (on a modal window).If user will click on Second language link he will go for that page and if he want to stay with english he just needed to close the window. ...