jquery

Regular expression matching in jQuery

In jQuery, is there a function/plugin which I can use to match a given regular expression in a string? For example, in an email input box, I get an email address, and want to see if it is in the correct format. What jQuery function should I use to see if my validating regular expression matches the input? I've googled for a solution, b...

Interacting with jQuery plugin objects after their creation

I have a ticker which items are updated using polling. I have written a simple jQuery plugin for the ticker which is invoked like so: $("#cont ul").ticker(); Which turns a ul into a ticker, scrolling through the li. To add new items I have to add lis to the ul, which works fine. However, the OO in me wishes I could have an addItem fun...

jquery with asp.net server button throws an error Invalid postback or callback argument

Hi All, I am new to JQuery.....trying to use in my ASP.Net 2.0 website in this scenario: have three asp:dropdownlist at page. First two are filled at server, third one is filled by jquery at client side. There is also asp:imagebutton at page that takes selected values from each dropdownlist after Click event. Well that cause the error...

Can you use jQuery to connect to a .NET Webservice?

Is it possible to use jQuery to connect to a .NET webservice? Maybe something I can pass a wsdl url too. ...

JQuery Crop Image

Hello, I'm trying to figure out how to fixed the selection box size under JCrop, he mentions how to set an initial selection area but not how to make it fixed size. Does anybody knows how could I make it fixed. Thanks in advance. http://deepliquid.com/content/Jcrop_Manual.html ...

Using jQuery, how to locate an element when the Name and Value are known

Thanks for reading this I thought I could use find(), but couldn't make it work. I know I can add IDs or classnames, but would like to know how with the current markup. Thanks Here is the HTML <input name="keywordCheckbox" type="checkbox" value="S" /> <input name="keywordCheckbox" type="checkbox" value="C" /> <input name="keywordChec...

JavaScript TinyMCE/jQuery race condition on firefox

I have a website with a form that uses TinyMCE; independently, I use jQuery. When I load the form from staging server on Firefox 3 (MacOS X, Linux), TinyMCE doesn't finish loading. There is an error in Firefox console, saying that t.getBody() returned null. t.getBody(), as far as I understand from TinyMCE docs, is a function that retu...

Javascript / Flex communication use case [need advice]

Hello everyone, I have a web page with a flex component, the flex component is responsible for creating an image from user inputs. Once an image is ready the user enter some more information in the HTML form and click on the send form button. When this button is clicked, javascript calls a function on the flex components which returns...

jquery - changing an element id

I need to change an element ID. (yep, jQuery newbie) Apparently these don't work: jQuery(this).prev("li").attr("id")="newid" jQuery(this).prev("li")="newid" I found out that I can make it with the following code jQuery(this).prev("li")show(function() { this.id="newid"; }); But that doesn't seem right to me. There must be a b...

jQuery slider range

I am trying to use the range property of the jQuery slider so that the slider control displays two handles from which the user can select a price range for real estate. The code I have is: $("#price").slider({ range: true, minValue: 0, maxValue: 2000000, change: function(e, ui) { var range = (Math.round(ui.range) * 10) + " to " ...

Project Suggestion for ASP.NET MVC

I was thinking that i wanted to gain some experience in the new asp.net mvc and some asp.net ajax. So i'd like to get some project suggestions that would suite for this! Would maybe be fun to create a little bigger project on codeplex, like the storefront project. ...

Can you create 'Dynamic' tests with MS Test Suite?

I'm using QUnit to test some JQuery, and I've got Watin to load up the test page and parse out the test results, but I'm wondering if there's a way to dynamically generate the tests from the page using the MS Test suite rather than having to write a Test function for each test? I'm just trying to reduce the amount of code having to be w...

prevent values in form from passing

I have 4 elements in my form. Usually, when submitting the form you would get this in the url:index.html?day=01&month=01&year=1999&reporter=Joe+Blogs However, in my interface, users are switching between the date picker and the person picker. Is it possible to only send the values on the select that is active? [I started writing this t...

Jquery AJAX with ASP.NET WebMethod Returning Entire Page

I'm doing some simple tests (in preparation for a larger project) to call an ASP.NET WebMethod using JQuery AJAX. In my example, my WebMethod returns a simple string. However, when I attempt to call it using JQuery, I get the entire HTML page content returned instead of just my string. What am I missing? Client Side : $(document).ready...

Simple jQuery function works in every browser but Firefox. What am I missing?

$(document).ready(function() { $("span.link").mouseover(function(e){ $(this.children).css("display","inline"); }); }); I'm not a javascript expert, but I've cobbled together a few functions using jQuery. In this case, the stylesheet hides some controls. When the user mouses over, this function exposes those cont...

Total width of element (including padding and border) in jQuery

As in the subject, how can one get the total width of an element, including its border and padding, using jQuery? I've got the jQuery dimensions plugin, and running .width() on my 760px-wide, 10px padding DIV returns 760. Perhaps I'm doing something wrong, but if my element manifests itself as 780 pixels wide and Firebug tells me that ...

Locating an element in a 'Facebox' box.

Heres my link: http://tinyurl.com/6j727e If you click on the link in test.php, it opens in a modal box which is using the jquery 'facebox' script. I'm trying to act upon a click event in this box, and if you view source of test.php you'll see where I'm trying to loacte the link within the modal box. $('#facebox .hero-link').click(al...

How do I get jQuery to select elements with a . (period) in their ID?

Given the following classes and controller action method: public School { public Int32 ID { get; set; } publig String Name { get; set; } public Address Address { get; set; } } public class Address { public string Street1 { get; set; } public string City { get; set; } public String ZipCode { get; set; } public String State...

How to disable mouseout events triggered by child elements?

Let me describe the problem in details: I want to show an absolute positioned div when hovering over an element. That's really simple with jQuery and works just fine. But when the mouse goes over one of the child elements, it triggers the mouseout event of the containing div. How do I keep javascript from triggering the mouseout event o...

how to stop link being followed until after jquery .animate has complete

back story: i am designing a portfolio website for myself. on its home page, the logo is front and center but on the sub pages the logo is top & right. i thought it would be a nice visual cue (upon clicking a link to a sub page) to use jquery to animate the movement of the logo from the middle to the corner of the page. the issue: th...