jquery

adding values on click to an xml string

First off, this is not my design, working with a WCF service that is a little strange. I have a lot of checkboxes/input's and when they are clicked/filled out I need to add that value to a certain part of the xml string, which is the hidden input's value. Is this close to the right way? The values are intended to be put into the section...

Simple self-made jQuery gallery flickers sometimes

EDIT: I changed up the code a little bit. First I made a secondary MasterPage that holds the template for the view page. I then added a bit of ASP script to have the first image present: <img src="<%= string.Format("/Content/Images/Products/{0}1.jpg\"", ViewData["CurrentPage"]) %>" alt="" class="imgborder" /> I ...

radio buttons act like checkboxes with jQuery

Hi, Is it possible a radio buttons group to have the functionality like checkboxes? (possible jQuery solutions) Thanks ...

jquery .post with $("html").html(data), body css not working

i'm using the following code to submit a form: function submitfilter(){ alert("in here"); var o = $("#opentimes").val(); var p = $("#price").val(); var d = $("#distance").val(); var t = $("#type").val(); $.post("eateries.php", { opentimes: o, price: p, distance: d, type: t }, function(data) { $("html").html(data); } ); return fal...

PHP array to JS array with jQuery and json_encode

I just want to get my PHP array to a JS array, what am I doing wrong here? PHP: // get all the usernames $login_arr = array(); $sql = "SELECT agent_login FROM agents"; $result = mysql_query($sql); while ($row = mysql_fetch_array($result, MYSQL_ASSOC)) { array_push($login_arr, $row["agent_login"]); } $js_login_arr = json_encode($log...

jQuery: shorten code

Hello, Can this code be shorten in some way? I've tried several ways to compact it, but I can't get it to work: //Customer info $('input#state-field-a, input#state-field-b').hide(); $('select#country-a').change(function(){ if ($(this).val() === "United States" || $(this).val() === "Canada" ||$(this).val() === "null") { ...

Is there a way to clone form field values in jQuery or javascript?

jQuery has a clone() function that clones the actual form with no problem, but it doesn't preserve any values that have been entered into the form. Is there a way to get around this? Sample code would be much appreciated. ...

Images that load as they appear in the page via jQuery slide / scrollable?

I noticed that the images in this site load in an interesting way. The site consist in 3 pictures (left. right and middle). After clicking the right picture it moves to the center via jQuery slide / scrollable (i guess) and the new picture on the right loads (it wasn't previously loaded). How is it done? ...

jQuery UI Datepicker Slow During Typing

I've heard all these great experiences of how great and elegant jQuery is, but I'm 0 for 2 trying to implement jQuery controls in real world projects due to poor performance. I am running into a similar problem as Richard this time. The jQuery UI DatePicker failed User Acceptance Testing in an ASP.NET application I'm working on because...

How to simplify this jQuery expression?

$country.parent().parent().next().children('td').children('.province-select') Basically I have some HTML that looks like this: <table> <tr> <th>country</th> <td><select name="country"/></td> </tr> <tr> <th>province</th> <td><select class="province-select"/></td> </tr> </table> Once I'v...

Force recalculation of $(...).css("background-image") on linked stylesheet reload

Hey, long story short, (I only need functionality in Chrome) Context: I'm hacking together a node.js script that automatically watches the files it serves for changes and then uses a websocket connection to push a message to a control page in the browser that manages the reload of assets. For instance, if an html page has an <img href=...

jQuery : displaying a div according to which image i clicked on

Hello, i'm having a trouble to display text according to images i clicked on. <ul id="boutique1"> <li><a href="#first"><img src="images/image1.jpg">nothing</a></li> </ul> When i click on these first link, i want to display that : <p id="first" style="display:none;">Hello World</p> Into this div : <div id="alert"></di...

jcarousellite with next prev button and auto slide together

http://www.gmarwaha.com/jquery/jcarousellite/?#demo Hi, jcarousellite is a very nice jquery extension. I am using it for both auto slideshow and prev/next button. However when I combine this effect like this $(function () { $(".hd_splash").jCarouselLite({ btnNext: ".next", btnPrev: ".prev", visible: 1, ...

Problem understanding javascript multi-dimention arrays

I've been struggling with this for hours. I'm obviously missing something completely. I want to get some values out of TinyMCE textboxes, along with IDs. Then post these via ajax to the server. jQuery 1.4 and JSON library are loaded var send_data = []; $('.contact_check').each(function (i, item) { var this_id = $(it...

How to avoid 3 ajax calls?

I wrote some code that filters a province/state select field after you choose a country: var cache = {}; function updateProvinceOptions($select, values, initial) { for(i in values) { $select.append('<option value="'+values[i][0]+'">'+values[i][1]+'</option>'); } $select.va...

Silverlight or jQuery? Choosing the technology for the future.

Will jQuery together with HTML5 be the technology of the future? Or will Silverlight dominate the internet market share with the upcoming versions 5 and 6? Do you think it' safe to pick either technology if I have no specific preference for jQuery or Silverlight? EDIT: Please don't vote for [Close]. I am looking for valid and construct...

What does jQuery use to minify their css and javascript?

I know that they use Google Closure for their Js files in 1.4 but what about css? ...

jQuery, Validate A or B but not A and B

I am using the jquery validate plugin and am attempting to validate a select or an input but not both. This is what I started with and here is my pseudo working example. //makes only one field required state or territory $('.state_territory2').bind('change', function() { if ( $(this).is('select:selected') ) { // state selected ...

jQuery AJAX POST variables not accessible on server

I am using jQuery to post some data to an asp.net mvc site. The post takes place successfully and the target controller action is hit when I debug it in Visual Studio, however it seems that the data I am passing is not getting carried over. I can't see it either in Request.Params or Request.Headers My post is as follows: $.ajax({ ...

Trying to prevent jQuery mouseout fadeOut() on div sitting on top of an image -- content loaded via ajax

Fellow rollovers, I'm trying to prevent a div from fading out and disappearing when it's not supposed to. This div sits on top of an image. The image has a mouseover and mouseout function that makes the div appear and disappear as the user rolls over from one image to another. I should point out that the div and all the html around it...