Using regex with jQuery binding of custom events?
Is it possible to use a regex in jQuery's bind method for custom events. Something like... $(selector).bind(myRegex, function(){}) ...
Is it possible to use a regex in jQuery's bind method for custom events. Something like... $(selector).bind(myRegex, function(){}) ...
Is it possible to achieve the following, using jQuery: I'd like to create two different objects that have different functions with the same name. var item = new foo(); item.doSomething(); var item2 = new bar(); item2.doSomething(); Furthermore, I'd like to be able to use the created items as "regular" jQuery objects - for example, t...
Why does jQuery.ajax() throw an error with no error message if you use a URL with a dfferent server? ...
Hey all, I've been working with the excellent jqGrid plugin, and it works great. Recently though, I was asked to implement some custom tooltips for the grid. Now, the documentation is very thorough, but it doesn't address how (if it is at all possible) to accomplish this. Here's an example of what I'm looking for: |col A | col B |....
I am developing my website using jQuery. For the Private Messaging feature, what I had right now is showing a ModalBox(dialog box). So, whenever user wanna check message, they will be displayed with a dialog box with the inbox shown. Now, inside that ModalBox, I have a "Compose" section where users can send message. My question is, when ...
So, you have a page: <html><head> <script type="text/javascript" src="jquery.1.3.2.js"></script> <script type="text/javascript"> $(function() { var onajax = function(e) { alert($(e.target).text()); }; var onclick = function(e) { $(e.target).load('foobar'); }; $('#a,#b').ajaxStart(onajax).click(onclick); }); </script></head><body> ...
we're using js to do png replacement, and we also have ajax updates on some of these elements. when the page fragment gets updated, the png fix gets lost, since the png fix traverses the dom and replaces png bg images when the document loads. is there a way to render the png replacement when the ajax update takes place, rather than only ...
Hi, I'm using jquery.validate.js on a form which is working as it should except for an area where users can choose between paying by cheque, or credit card. Depending on which option is chosen, a hidden div will show. By Cheque: <div class="accordionButton"> <label for="Cheque"><input onclick="javascript: $('#li_buttons').show('slow'...
I have setup a jQuery UI modal dialog to display when a user clicks a link. There are two textboxes (I only show the code for 1 for brevity) in that dialog div tag and it is changed to be a jQuery UI DatePicker textbox that reacts on focus. The problem is that the jQuery UI dialog('open') somehow triggers the first textbox to have focu...
I have a page which has a tabbed view which contains 3 sortable columns below it. Currently, the tabs don't have any jQuery code associated. I gave them all the droppable class, however, and now in IE if a piece of content is dragged between columns and then moved again, jQuery blows up while trying (i think) to access the parentNode i...
Hi , We are creating a web page with header, content and footer. The header and footer should be visible at all time and the content should be scrollable. The container div has a fixed width but no fixed height. I solved the problem of keeping the footer at the end by using css sticky footer (http://ryanfait.com/sticky-footer/) The con...
I'm using the Jquery calculation and have just about everything working properly, but I need the total to display as 99.90, not 99.9 <-- Just an example. Here is a link the form I'm using. [link text][1] [1]: So... .toFixed(), isn't working for some reason, when it should be! I can't find a mask that would work with this problem. ...
Hi I'm working with some very basic jquery code and would like to condense what I've done into one function with passed parameters. I have a few of these: $(".about").hover(function() { $(this).attr("src","_img/nav/about_over.gif"); }, function() { $(this).attr("src","_img/nav/about_off.gif"); }); $(".artists").hover(f...
How can I pass input from a text-type input element into a hidden input element in the same form on a site that has jquery installed? ...
I am using .post to post my data to my controller. I would like to pass all the data that I have in a form. Is there an easy way to take all the form data and add it to the .post command to send it? ...
Hi, I need to return a list of blog posts (subject, body, datecreated, commentCount) Should I return a json response or xml? In the calling page, I will have to inject this into the page (its an ajax call). So I need to be able to loop through the blog posts, and create HTML with the blog post info etc. and inject into the page. I'l...
hey, sorry if this is pretty vague.im happy to provide any further information should it be needed. Im working on a webpage which uses the jquery change() function to perform updates on the page with regard to the users input, for example change the color of a div depending on what the user enters.Each form entry is part of the class "f...
I currently have a jQuery function that replaces an image when clicked. For instance: <script type="text/javascript"> $('#test').click(function(event) { event.preventDefault(); img = $('<img id="myImage" class="photo" src="newImage.jpg>'); $("#myImage").remove().append(img); }); $('#myImage').click(function(event) { ...
I want to call fillContent then later called beginEditingQuestion fillContent(cid, "questions"); beginEditingQuestion(qid); The problem is that I can't rung beginEfitingQuestion until all the ajax in fillContent is done. Is there an elegant way to delay the code? The only idea I can think of is to make a totally new function fillConte...
I'm using jQuery to create a "dialog" that should pop up on top of the page and in the center of the page (vertically and horizontally). How should I go about making it stay in the center of the page (even when the user resizes or scrolls?) ...