jquery

Processing only visible form fields for validation

I need to validate a bunch of form fields within one element. I just need them all to be 'required', not necessarily input checked (email, phone number, etc). The problem is, I have the form dynamically showing and hiding inputs and select elements, and I need the validator to ignore hidden ones. I have looked into this a fair amount -...

JQuery equivalent of Coldfusion navigate, with post of FORM data?

I'm looking into using Jquery to replace some of our native Coldfusion ajax functionality. I really like the ability of Coldfusion AJAX to navigate simply and directly to any container (window, div,etc) and send along the content of any specified form data. Is there a JQuery way to do this? ...

Jquery select multiple checkboxes

I have a list of categories paired with checkboxes. I can't find any documentation on how to store all the selected checkboxes in a var and send the data to the server. I need to delete from the database the selected categories. This is part of the code I'm working on. var cat_id = $('check_box').attr("id"); //gets the id of the checked...

Can't get hoverIntent jquery plugin to work

I must be making some obvious mistake but it just doesn't seem to work. <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <title>Untitled Document</title> <link href="css/style.css" rel="stylesheet" type="text/css" /> <script type="text/javascript" src="js/jquery.js"></script> <script type="text/javascript" sr...

How can I use a different CSS using jQuery?

I was designing a mobile version of my website but then realized I need to support at least three (iPhone, iPad and Android). In that case, I was thinking of using jQuery for the task where I would first detect what device it is and then load the appropriate CSS. How would I go about doing this? Is it something like this? And is this eve...

jQuery Global variables are not accessible by functions

I have a snippet of code, to calculate the width of some child items and instead of declaring the parentWidth and other variables in EVERY function.. I am trying to create Global variables to be re-used.. but, its not working. Here is a portion of my code: $(document).ready(function(){ parentWidth = $(this).parent().width(); // pa...

How do I swap these icons onHover with jQuery?

<div id="compv-navbar"> <a href="#"><img src="image1.png" id="icon1"></a> | <a href="#"><img src="image2.png" id="icon2"></a> | <a href="#"><img src="image3.png" id="icon3"></a> | <span id="view_name"> 2-up</span> </div> Assume the names of the new images follow this formula: name + "-hover". So ...

jQuery UI list view control

Is there some kind of jQuery UI list view control? If not what are my alternatives other than creating my own table/divs? ...

link Redirect from php

Dear all I have database of website link, it list out in main file ,when i try to click that link it get to redirect on that database link. my code is test.php <?php // getting from database echo '<li onclick=\"window.location='.$result->website.'\"> <a href="#">'.$result->option.'</a></li>'; ?> The Main.h...

replace url with other url using jquery

Hi, how can I replace all url's in a page with different URL using jquery ? thanks :) ...

jquery ajax return data problem?

how to return jquery ajax data to a string? code like this var data=$.get("e/as/ajax-dialog.php?do=member", function(data){ return data; }); alert(data); ==> [object] [object] is not what I want I want the ajax callback html code to data[string].. please help me thinks a lot ////////////////////////// update ///////////////...

Jquery Tools Slideshow Plugin: How to override default configs

On this page: http://flowplayer.org/tools/tabs/slideshow.html Halfway down the page I find this code under the heading of Usage: $(".slidetabs").tabs(".images > div", { // enable "cross-fading" effect effect: 'fade', fadeOutSpeed: "slow", // start from the beginning after the last tab rotate: true // use the slideshow plugin. I...

jQuery UI Autocomplete code doesn't work w/ valid XML, any ideas why?

Using jQuery UI's "XML data parsed once" autocomplete. I've checked the feed and it comes out as valid and I even logged it with error() and I get OK 200 for the status and 4 for the readystate (the XML file can be seen below). http://www.finalfantasyunion.com/includes/xml/games.xml My jQuery code is: <script> $(document).ready(funct...

Stop jQuery animations

My JavaScript is as follows: $.get("/<page>.php", "userid='.$userid.'&"+status, function(data){ $("#status").show("fast").html(data).delay(4000).hide("fast"); }); I have many links on a page that will load this jQuery AJAX and display the status in a div correctly. It all works fine, except if a user click many of the link...

auto suggest/ auto complete in a textarea

Hi, I have a small requirement like . i need to fetch all record from table or store elements in key=>value pair. so that when a user types in the key . it should show the value part of it and if he presses enter button ,it should use it or else continue with typing. I need to use jquery framework. Is there any plugin already avail...

How stop an HTML form from submitting if user is not signed in, but allow submit if user is signed in?

In my app, a user must be signed in to submit form info. After a user clicks on the form submit button, my jQuery checks if a user is signed in. If not signed in, then an error message pops up, requesting sign in/up. I can now successfully stop the default action (submit). However, how do I also allow the default action if the user ...

Change Src & get new height using jquery

Hello I'm trying to center a new image vertically in a div after changing the src using attr in this way: $("#image").attr("src",newsrc); var height = $("#image").height(); var newmargin = (divsize - height)/2; $("#image").css=("margin-top",newmargin); it always uses the height of the previous image. is it a timing thing? do i need t...

possible to replace window.location.hash?

I'm wondering whether it's possible to change the hash in window.location.hash and replace it with 'this.id'. Or would I need to change the entire window.location? Many thanks! ...

Jquery Sortable, delete current Item by drag out

Good morning, i hope someone can help me. My Problem: The sortable event out: fires when i drag something in the list or when i sort the list. But i only want to start the function when i drag a item out. My code $(document).ready(function ust() { $('#div1').sortable({ out: function(eve...

Disabling previously searched term suggestion in a search bar

I was following this tutorial: http://www.marcofolio.net/webdesign/a_fancy_apple.com-style_search_suggestion.html And checking out the demo here: http://qpoit.com/marcofolio_demo/apple_search/ I realized something. If you take a particular search term, like iPhone for example, and type that into the demo search bar and hit the return ...