jquery

Raising Errors on Failed Validation

Please check out the code HTML Code: First Name: <input type="text" name="fname" id="fname" > <p id='p1'></p> Last Name: <input type="text" name="lname" id="fname" > <input type="submit" name="submit" value="Submit" onclick="return validate_form();" > Validation Code: function validate_form() { if ( document.form.fname.value ...

how to make voting system like stackoverflow using ajax/jquery/php (efficient)

Hi everyone, I'm trying to make post voting something similar to stack overflow vote up and vote down, now I made it work with (but-it-works approach) and yet something doesn't feel right, hopefully someone will suggest some useful tweaks. Here is my jquery code : var x = $("strong.votes_balance").text(); $("input.vote_down").click(...

How do I move identical elements from one div to another with jQuery?

With the example below, I'd like to select the contents of the < h3 > tags for each block, and move them inside the 'title' divs (without the h3 tags). Is this possible? <div id="block1"> <div class="title"> </div> <div class="content"> <h3>Title 1</h3> </div> </div> <div id="block2"> <div class="title"> </div> <div c...

Internet Explorer 8 error - Expected Identifier, string or number - JQuery...

Wondering what to do about this. Googling but can't seem to find anything. I am using the Cycle Plugin for JQuery and works great in all browsers but IE of course. Same problem in IE 6, 7, and 8. Expected identifier, string or number referring to line 13 of my js file. Anyone know what to do here? js file: $(document).ready(function(...

How do I share jQuery script between pages?

Hi folks, what is the best way to share jQuery code between pages? this is the situation: -------SITUATION--------- I have several different pages that goes this way (pseudo code) <% render "content/link" , collection => required_links %> In the "content/link" partial <div class="element_to_be_changed"/> Currently in EVERY PAGE...

Changing DIV color without giving an ID ?

Hi all. I have the following code : <div id="wrapper"> <div style="width:500px;background-color:yellow;"> // this is a parent div <div style="width:260px;"> <a href="javascript:XXXXX">Click me to color only the FIRST yellow div</a> </div> </div> <div style="width:500px;background-color:yellow;"> // this is a paren...

Why does my if condition prevent either clause from executing?

I'm trying to re-write the URLs of a set of links that I select using a jQuery class selector. However, I only wish to re-write the links that don't already have a href attribute specified, so I put in an if/else construct to check for this... However, it's not working. It does work without the if else statement so I'm pretty sure that i...

Why isn't this function executing?

I'm having an annoying problem which I have asked some questions about already, now I finally tracked it down, and I think I'm close to a solution, with your help of course. I have two JavaScript files, both using jQuery, but only one of them are running. The one working starts with "$(document).ready(function() {.." and works just fine...

jQuery Sortable and Droppable

I want to have a list that is sortable, but I also want the elements in that list to be droppable to the divs I have defined as droppable. I can't seem to find a way to do it. Any ideas? ...

jquery and input text

Hi everyone, I would know if this is a bug... When I alert html content from #test, I get : <input name="sum" value="" type="text"> whereas it was set to 55 just before the alert, and I can view it on the brower. Can you tell me why ? :-) <div id="test"> <input type="text" name="sum" value=""> </div> <script language="java...

Open an overlay while nextpage is loading

Trying to open an overlay (with JqueryTools) with loading message before the page changes, can't find how to use the href attribute of my trigger (i'm using a class .btn_menu for multiple button) HTML <div class='btn_menu'> <a class='modalInput' rel='#loading' href="a_mailling.php"></a> </div> JS $(function() { var triggers ...

Date Validation using JQuery Validation

Hi ..., I'm trying to validate date using jquery validation. Included Javascript Library is: <script type="text/javascript" src="<?php echo base_url()?>asset/jqueryui/ui/ui.core.js"></script> <script type="text/javascript" src="<?php echo base_url()?>asset/jqueryui/ui/ui.datepicker.js"></script> <script src="<?php echo b...

jQuery animations not working on iPhone

Hi everyone, I'm using jQuery on a client's vCard site - http://chrismward.com/beta - to switch between pages. It all works great on the computer, but when I try on my iPhone: no dice. I'm using jQuery 4.0 and here is the only js file I'm using on the site (other than jQuery from the Google CDN) - http://chrismward.com/beta/resource/...

Dynamically resize Inputs

I've got this piece of code for a jQTouch/jQuery page that dynamically resizes inputs to the window's innerWidth - the associated label width - 50px. <html> <head> <title>resizeInputs</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <style type="text/css" media="screen">@import "jqtouch/jqtouch.min.css";</st...

Howto use variable attribute for Jquery lightbox plugin

Hello, I try to implement the JQuery Lightbox plugin with dynamic grouped of images (grouped in image popup), but i can not find the clue for popup grouped images. Can someone tell me what i'm doing wrong? HTML <a href="pic1.jpg" class="pic" rel="lightbox1"><img src="pic1.jpg"/></a> <a href="pic2.jpg" class="pic" rel="lightbox1"><img...

How do I switch external css files with ajax?

I've got a couple books that I'm reading on ajax, but still quite new. All the tutorials and these books have the ubiquitous examples of: an auto-populating search bar and an asynchronous form validator. Those are both great, but not what I'm looking for. Specifically, I'm wanting to click a button and switch the external css file in ...

JQUERY, Warning Users that IE6 Is Not Supported are wanted

Hello, I'm building an app and have no intentions of support IE6 at this time. To be fair to IE6, I want IE6 users to know that and not think the app was made by incompetent developers. I was hoping a JQUERY Plug-In would be available that would provide a nice StackOverflow style alert at the top of the page, plug & play and I'm done. ...

Write local file with jQuery or Javascript

I am creating a prototype that will be run in a web browser. I would like to store (and retrieve) various info submitted by a user during the use of the prototype. I know I can retrieve a variety of file formats such as xml, json... and I know I can do local storage using the plugin jstore. So I suppose I can do a convoluted solution whe...

JQuery toggle/slider flicker in Firefox

Hmmm... I have read about this issue on various other threads here on stackoverflow but am still experiencing the problem on my work in progress (without quite as much exciting jQuery involved) www.thebeverley.com Simple toggle that expands fine but flickers on collapse - you will need to scroll down to use the same button to collapse...

i ajax a file with jquery,and i don't know where does it download to.

$.ajax({ type: "POST", url: "http://images.digu.com/web_res_v1/images/logo.png?t=20091230", success: function(msg){ alert( "Data Saved: " + msg ); } }); where is the download file. thanks ...