jquery

jquery hide() and Internet Explorer 8 compatibility mode.

I have been using jquery hide() and html() function a lot. Lately, I have been noticing some weird behaviors on IE8 in compatibility mode. Say, I submit a form via $.ajax({ ... }). Before the submission, I display a "saving, wait!" message and hide the button. On success i clear this message and display the "save" button again. My pr...

Firebug: "The 'charCode' property of a keyup event should not be used. The value is meaningless."

I'm building a calculator, and am using the following: jQuery(function($) { $('#Quantity').keyup(function() { console.log($(this).val()); }); }); Q1: Is keyup() the right event to be using? Q2: Why is Firebug telling me "The 'charCode' property of a keyup event should not be used. The value is meaningless"? I notice...

Wondering if this code excerpt can represent a event listener...

Can we call this: $('#nomeInput').keypress(function(){ //code here... an event listener? Thanks. ...

Regular Expressions in a jQuery selector

Would it be possible to select using a regular expression in jQuery? Something like $('input[name=^[a-z]+_[1-9].*]') ...

Javascript store locator to Jquery

I'm in a bit of a rut. I need to figure out how to convert all this code into jquery. Since I don't know too much jquery. http://www.lastyearsloss.com/store/javascript/map.js I'm not sure which lines I can use or which ones change fully. The main problem is where I'm importing the data from xml. If anyone can point me in the right direct...

Struts Jquery Plugin: Remote Dialogs With Parameters

I have a somewhat complicated issue. I have a grid defined (using the Struts2-JQuery Grid Plugin). One of the columns has a custom formatter that calls a Javascript function to put a button into that column. (Note: I absolutely HATE doing it that way). The point of the button is to open up a dialog box. This dialog box contains a check...

JQuery error on window.load()

I'm new to Jquery, but I'm using it in a .NET 2.0 project to time our users out of the system after 13 minutes of inactivity. I've got a function that basically blacks out the screen and gives them a button ton continue working. It's been working for awhile, but only works inside of "child" windows because of the way I implemented it. ...

Problem with jquery function.hover

Hello, I have make a javascript code. This is the code /*************************/ /* twitter ticker */ /*************************/ var nieuwsbrief_formulier_open = false; $("#footer a.twitter").hover( function() { if(nieuwsbrief_formulier_open == false) { nieuwsbrief_formulier_open = true; ...

Serialize form to and from JSON

I want to serialize a form into json, process the json object, then reserialize it to send to a php script via ajax. Here is a rough example of what I want to do: s = $('.dia_req_form').serialize(); j = //convert s to json ...HOW?? if(j.name) { alert("you must enter a name"); } if(selectedID) { j.id = selectedID; } s = //serial...

Caching a large number of images in a jQuery/HTML5 application

I am building a web application in jQuery/HTML5 which will run in Webkit-based browsers on touchscreen kiosks. There are a large (thousands) number of images which the application uses, which I need cached to each browser. At first I thought a HTML5 cache manifest would be the best option (with the thousands of image URLs listed), but ...

JavaScript/jQuery: Keypress for keyboard navigation (event.which doesn't work)

When handling key[Up|Down|Press] events, should I use .which or .keyCode? Can I have some example code for handling the three keyboard events in jQuery? Can you do it without jQuery? I want it to work reliably in every browser. Update Strangely, jQuery's event.which normalization wasn't working for my handleKeyPress(event) handler: //...

jQuery: how do I convert this to 1.3.2?

d = $j("#sort_sections > li").map(function(index, element){ return [[element.id, $j(element).find("li.content").map(function(subindex, subelement){ return subelement.id; }).toArray()]]; }).toArray(); It currently works in 1.4.2, but I need it to work in 1.3.2 =\ ...

Notification bar to web page similar to the SO

How do I write a notification bar in JavaScript similar to the one that you see on Stack Overflow? In my project they are asking for one just the same as this website I wrote the code for this for this but I am not getting the exact one ., I want to know about the cookie logic and vertical slidiing and fadeout and any modifications in...

jQuery: I'm trying to send data via AJAX for jQuery.ui.sortable but it doesn't send everything.

I'm trying to build an array structured like [ [num, [num, num num]], [num, [num, num]], ] but I get [num,num,num,num,num,num,num] =( code here: http://jsfiddle.net/WRppV/4/ the problem is that I'm trying to send the var 'x' as data in an AJAX update function that jQueryUI uses for sortable. And it needs to be the arr...

Creating rules efficiently for large forms.

I'm using the jQuery validate plugin to validate a form with a lot of fields: <td><input name="first_name0"></td> <td><input name="last_name0"></td> <td><input name="age0"></td> <td><input name="first_name1"></td> <td><input name="last_name1"></td> <td><input name="age1"></td> <td><input name="first_name2"></td> <td><input name="last_na...

convert textbox to multiline with jquery

I have a single line textbox. I want to with jquery convert it to multiline but control how many lines that are added to it. I want to also be able to limit the number of characters on each line. Any ideas how I can do this with jquery? EDIT: Yes what I meant by textbox was <input type="text"> EG. <input type="text" value="" name="t...

jQuery - Cancel form submit (using "return false"?)?

Hey there. I'm running into a bit of trouble while trying to cancel the submit of a form. I've been following this tutorial (even though i'm not making a login script), and it seems to be working for him. Here's my form: <form action="index.php" method="post" name="pForm"> <textarea name="comment" onclick="if(this.value ==...

.each() > $(this).find().eq().html() is null

Why don't work? var str; $('table tr').each(function() { str = $(this).find('td').eq(6).html().trim().substring(10, 20); $(this).find('td').eq(6).text(str); }); Need write in all 6th trim+substring+another_string_action with same value. Firebug write error: $(this).find("td").eq(6).html() is null ...

how to change class of <a> tags in jquery

I have a table structure, something similar to <table style="width: 100%;"> <tr> <td> <a href="#" class="xx">one</a> </td> <td> </tr> <tr> <td> <a href="#" class="xx">Two</a> </td> <td> </tr> <tr> <td> <a href="#" class="xx">T...

how to make my code only alert 'gggg' , can not delete the first Statement using jquery

this is my code : <input type="button" value="edit" id="edit"/> <script type="text/javascript" src="jquery-1.4.2.js"></script> <script type="text/javascript"> $('input').click(function(){ alert('sss') }) $('input').click(function(){ alert('gggg') }) </script> and when i click the button,...