jquery

Submit a Form to a new Tab more than once

I am trying to build a simple form for sending a newsletter: <form method="post" id="newsletter_form" action=""> <label for="subject">Newsletter Subject:</label><br/> <input type="text" name="subject" class="textField large" id="subject" /><br/><br/> <label for="contents">Newsletter Contents:</label><br/> ...

maintain function order in jQuery ajax callback function

I have a jQuery ajax function. the callback function consists of two functions: 1) Take the ajax result (which is an html form) and insert it as an html span's inner html. 2) Submit this form How can I ensure that the form is loaded before JavaScript tries to submit it? Code: $("select").live("change", function(){ FormUpdate(); }...

jQuery Refactoring/Maintaining

I've searched a little bit around SO and haven't found any questions/answers that are helping me. The problem is my jQuery function calls are getting much too large to maintain. I'm wondering if I should be refactoring a lot more or if there is a better way to do all of these calls. You'll see as I make one call, the anonymous functio...

link with href="#" scrolls page to top when used with jquery slidetoggle

hello to all, I'm using jquery's slidetoggle to show/hide divs. the element that controls the sliding is a text link ( some text inside <\a>) which has href="#" so it will look like a link (underline, cursor change). the problem is that when the link is clicked, in addition to the sliding effect, the page scrolls to top. i tried rep...

jquery click event is firing multiple times when using class selector

here is my html <li><div class="myLink" id=1>A<div> <li><div class="myLink" id=2>b<div> <li><div class="myLink" id=3>c<div> <li><div class="myLink" id=4>d<div> <li><div class="myLink" id=5>d<div> <li><div class="myLink" id=6>e<div> <li><div class="myLink" id=7>d<div> <li><div class="myLink" id=8>g<div> i created a jquery event bind wi...

Stop/start 'hover' on click

Hi! I am a newbe as it comes to jQuery.. I'm working on my portfolio, and i'm stuck.. I have a page with all portfolio-items (images) that can be sorted by category. So when i press on category 'Art', all the other catergory's turn to a low opacity so the selected category stay''s highlighted. See it working here: link text But when I h...

IE6 transparent PNG's are stretched out when using supersleight jquery plugin.

This is driving me insane: I'm an intern: my boss wants me to use the jquery plugin "supersleight" with 32-bit png's to make them transparent in IE6. I got all the html working, and they are all placed correctly, but when I apply the javascript those png's that use padding are stretched out. I needed padding to get some buttons in place ...

Javascript (jQuery) Syntax on button click action

I have the following Javascript: var form = $(formArray[i]); var formAction = form.attr("action"); var button = form.find("input:submit"); button.click(function (formAction, form) { return function () { var formAjaxAction = formAction.replace(originalString, ajaxString); ajaxPostHandler(formAjaxAction, onSuccessFunc, function ...

Dynamically Add Elements to jQuery Sortable

This should be my last question on Jquery Sortable...for a while :) I have a list that I'm able to remove elements from dynamically. when users click the X close box on the element, I get the parent (the element itself) and remove it: function DeleteLink() { var jItem = $(this).parent(); var LinkId = jItem[0].chil...

draggable accuracy in jQuery

Hi: I am running of a problem when I am trying to make a special drag drop in JQuery.In few words. from the link above you can see that when we drag the boxes to the dropping areas (the left red boxes) they ( I mean the droppable boxes) does not seem to be activated unless the dragged box reach the center of the target ( the droppable b...

a simple question on jquery closure

what does this mean? (function($){ })(jQuery); to make the question clearer, what does wrapping a function in parenthesis mean in JS (sorry, I'm a bit confused on the concept of closures). What about the $ parameter? and the "jQuery" in the end parenthesis? Can I do the same with mootools and combine them in 1 JS file? (function($){...

Problem jQuery and Prototype

Friends I have a problem with jquery and prototype: <head> <link rel="stylesheet" type="text/css" href="http://localhost/ecommerce/css/lightview.css" /> <script type="text/javascript" src="http://localhost/ecommerce/js/jquery-1.3.2.min.js" ></script> <script type='text/javascript' src='http://ajax.googleapis.com/ajax/libs/pr...

Injecting JQuery Cross-Domain

Hello, Is it safe to inject JQuery's script using JsonP? The installation of my web application is - adding a script to a customer's website (like google analytics). I was thinking of using JQuery on the customer's website, as part of my own injected script. I was wondering, if there is some kind of risk? The application needs to supp...

Can we use any type of javascript code as a external .js file or somtime it's necessary to place in <head>?

Can we use any type of javascript code as a external .js file or sometime it's necessary to place in <head>? ...

How to judge which javascript can be placed at bottom or which must be in <head>?

We can place JavaScript in 3 ways? as a external file in <head> in body <body> all methods are valid by W3C ? So How to judge where JavaScript should be placed at bottom or which must be in <head> or in <body>? I've seen JavaScript on many sites in <head> , as a external js, just before </body> and some time anywhere in <body>......

JQUERY, CSS, When moused over an LI show a SPAN tag inside?

Given the following: ul li .main .meta {opacity:0;} <ul> <li> <span class="main">TITLE</span> <span class="meta">meta</span> </li> <li> <span class="main">TITLE 2 </span> <span class="meta">meta</span> </li> <li> <span class="main">TITLE 3</span> <span class="meta">meta</span> </li> etc... long list... </ul> What kind of JQUERY...

How would I show elements based on what is selected in a drop down using jQuery?

Here is my run-of-the-mill drop down: <select name=""> <option value="">--Select One--</option> <option value="textarea">Text Area</option> <option value="textbox">Text Box</option> <option value="checkbox">Check Box</option> <option value="dropdown">Drop Down</option> </select> What I want to do is show show/hide other elem...

Too many data points in set. Looking for ways to prune.

I am gathering data from a website. I estimate to get 10.000 datapoints (time - value) multipled by seven - over time. That is way to much. Both for storing and plotting it in a real time alike graph (through jQuery flot). I'm looking for a text dealing with this sort of problems. To be more precise: algorithms, statistical math for find...

How do I use the onselect method of Jquery to goto a URL?

What I want to to is pretty basic. I have files that are number with dates, and when someone clicks a date on the calendar it should open that file. For example, if someone clicks november 20th it should go to nov/20.htm or generally {month}/{day}.htm. I've looked at the documentation and it mentions something about being able to call ...

Cannot load google map javascript dynamically

Hello, The follow tells me that GMap2 is not defined. But the code that uses GMap2 is in the callback. $(function() { $('#sample').click(function() { $.getScript("http://maps.google.com/maps?file=api&amp;amp;v=2&amp;amp;sensor=true&amp;amp;key=API_KEY_HERE", function() { var map = new GMap2(d...