jquery

Loop through javascript improvement

The below code works properly, but it is hard coded. I would like to be able to create an array of field sets, hide those fields, then each time I click on the "#createEventForm-eventInformation-addElement" button it displays the next one. The problem with the below code is that it is hard coded and thus would break easily and be much ...

reading / updating array of arrays object in javascript / jquery

Hi, I am trying to do the following but I am not sure how to do it. I have a grid (like excel) where the user will enter information. The grid has columns like "empno", "paycode", "payrate", "hours" etc. The user will enter a separate record in the grid for each paycode for each employee in the system. so the grid will look like the fol...

Open a url, in jquery php

Hello, when I click on "Click Here" then a page must open inside <script....> $('yahoo').html('<a href=desc.php>'); </script> <div id='yahoo'></div> <div id='clickhere'>Click here</div> Thanks Dave ...

form fields; jquery validation

i am trying to validate my form fields calling the input text ids, but jquery is not validating it. here is what i have: email2: {// compound rule required: true, email: true }, if i change name="email2" it works fine, but i want name="email[]" as i have an array of ema...

Binding, selecting and looping through XML data with jQuery

I have an XML document thus: <tab id="1"> <name>Individual</name> <coverLevel> <level id="1"> <month>20</month> <week>5</week> </level> <level id="2"> <month>40</month> <week>10</week> </level> <level id="3"> <month>80</mon...

Componetizing jQuery functions calls. Best practices?

I'm building a site that is going to consist of components. A component defined as a particular set of HTML and CSS and jQuery. Each page of the site will consist of many components. Per best practices, we're putting our javascript block at the bottom of the page. We load the needed .js files, and then I'm planning on calling the functi...

jquery ajax loader

I have script like this : $("#addk").bind("click", function(event){ //alert("here!"); $("#loader-overlay").show(); $.ajax({ 'async':"False", 'type': "POST", 'url': "http://url/feedback/", 'data': $("#form").serialize(), 'success': function(msg){ ...

jQuery.click(): Can I get a reference to the synthetic event object passed to event handlers?

I have an <a> inside a <TD>, and I'm trying to have clicks on the <TD>, but outside the <A>, act like they were clicks on the <a>. I'm almost there: HTML: <TD class="somethingPretty"> <a href="someURL" class="anchor">Text</a> </td> JS: $('.anchor').click(function(ev){return confirm("go ahead?");}); $('somethingPretty').click(fu...

Move an image to the position of a DIV using jQuery 1.3.x

I have a number of small images that I display that are the size of an icon (32x32). I want to animate them from their current position on the page to the x,y of a DIV anytime someone clicks on any of the images. What is the best route to do this using jQuery? ...

Large-scale jQuery Architecture

I do a lot of work on large-scale ecommerce systems. Our backend-code and html are fairly compartmentalized into large chunks based on functionality for the major sections of the system - product (browse, detail), account, checkout, etc. There are section-specific files for JS, but they are currently being concatenated and minified into ...

Jquery getting information from php

I need to get information from a php file and put the information in jquery and i also need to know if the information has changed ...

jquery .clone() weird behaviour in Firefox

Hi everyone. I have a following issue - I'm using jQuery to add additional input forms to the page. But added rows are not passed to the server with form submission. Here is HTML of one row: <form name="form1" method="post" action=""> <div id="input1" class="clonedInput"> <label for="answer1" class="answer_label"> Answer: </label> <i...

onclick event is broken in IE8

I have the following snippet which works as expected: <a href="http://google.com" onclick="return false;">Will go to google</a> Clicking on the href does not take me to google. But... if I include JQuery 1.4 and wire up a live click event to anything on the page (whether it exists or does not) this unrelated event handler stops wor...

Make timezone dropdown list populate with available timezones on a per Country basis?

I just noticed something really nice on the Google Analytics signup page for adding a new domain. First you pick a country them you pick your timezone. Instead of showing a huge Timezone list though they populate the timezone list with only timezones that are available for the country you have selected. I think this is a great idea t...

Codes fail to run when not wrapped in an anonymous function in jquery

If you paste these codes http://paste.plurk.com/show/152772 in http://htmledit.squarefree.com/ You will see the codes run without any problem. The images altogether will turn into a slideshow. However, if you paste the following codes: http://paste.plurk.com/show/152773 The codes will fail to run, no slideshow. These two pieces of c...

How do I check which elements have click binded to them with jquery ?

I want to chck which elements in my page are clickable, meaning that they either have href attribute (which is easy to check), or they have click event binded to them via JS . is there any way to do so ? ...

show/hide works with JQuery 1.3.2 but not JQuery 1.4

I have a function which submits data to my server, and then removes the edit UI and replaces it with the regular UI. This works perfectly under JQuery 1.3.2 but does not work with JQuery 1.4.0. Any ideas? function save_edit(point_id) { var data = {}; data.id = point_id; $.post("/foo", data, function(responseData) { $("#value...

How to create a smiliar Simpler Viewer image gallery thumbnail effect using Jquery?

Hi How do you create an effect like the Thumbnail in Simple Viewer image gallery using JQuery? The effect is When the user moves the mouse over an image, four sides of the image get covered by white color and when the user moves the mouse away from the image, the original image returns. Any suggestions ? ...

jQuery performance when selecting multiple items

More of a curiosity question...when doing the following: $('.selector1, .selector2').doSomething() Does jQuery fully traverse the DOM twice to get each set of objects matching each selector or is it finding all the elements in one traversal of the DOM? ...

how to update the every sec in jquery

I am trying to get the data from the php file and update every second so when the information changes in the php file it will auto update $(document).ready(function() { $.ajaxSetup ({ cache: false }); $("#hidden").hide(); $("#textfield").val(""); $("#textarea").val(""); var hol=$(this).attr('myval'); var formContent ...