jquery

manage sibling li elements from span in jQuery

Hello All, here is my html ( all li and span comes dynamically ) <div id="VMScrollBoth1" class="sliderGallery"> <ul> <li class="VMScrollBoth handle6"><span><a href="#"><img src="imagex.png"></a></span></li> <li class="VMScrollBoth handle6"><span><a href="#"><img src="imagex2.png"></a></span></li> ...

Can regular JavaScript be mixed with jQuery?

For example, can I take this script (from mozilla tutorial): <html> <head> <script type="application/javascript"> function draw() { var canvas = document.getElementById("canvas"); if (canvas.getContext) { var ctx = canvas.getContext("2d"); ctx.fillStyle = "rgb(200,0,0)"; ctx.fillRect (10, 10, ...

Multiple References to the JQuery Library in a page.

I have an ASP.NET application using a master page. I am adding a reference to the JQuery library in the master page however there are some content pages and user controls that reference the JQuery library directly. Will I need to remove each reference from those pages or can I leave them in place even though I am adding a reference int...

DOM traversal one by one node using jquery

Hi I wanted to traverse node by node on a web page by maintaining sequence. e.g. Below is basic DOM : <BODY> <DIV id ='1'> Test 1 </DIV> <DIV id='2'> Details about <SPAN id='3'> Execution </SPAN> </DIV> </BODY> As per above example I want traverse each node by node i.e. 1st Traversal : <BODY> 2nd Traversal : <DIV id =...

JQuery Validate individual fieldsets

Hi, I've developed a form with multiple fieldsets to represent steps in filling out the complete form. The fieldsets are shown and hidden by button click (one on each fieldset) but I want to validate each fieldset before the next is shown. I'm new to JQuery and I'm having a bit of trouble. I found this guide ( http://encosia.com/2009...

Jquery dropdown remove class after disappears

I have this code for a dropdown and I need to remove the class 'hovered' on '#products' after the menu slides up and has disappeared. How do I do this? Currently it disappears straight away onmouseout Thanksfor any help in resolving this! :-) $(function() { var divTop = 168; $('#products div ul').css({'margin-top': '-' + divT...

jquery JSON making an OPTIONS request despite GET being set.

Hello, I am having an odd problem on Windows whilst using any browser. When I make a request from my local machine to an external website with a JSON file. Apache receives an OPTIONS request rather than a GET despite GET being specified. After some research it looks like a cross site request issue however, most of the articles I found w...

is there a way to set an asp.net session variable from a javascript/jquery link?

Basically i am trying to set a session when a user clicks a specific button is this possible? So i need to set this session Session("TenHolStDateNewCheck") = "%" When this link is clicked <a href="availability.aspx" class="sidelink">blahblah</a> thanks Jamie ...

Jquery copy and paste DOM node?

Hi, I have a table that looks like the following. <tr> <td>Link Name</td> <td><a href="#" class="edit">Edit</a></td> </tr> At the bottom of the table I have the following. <tr> <form class="hidden create"> <h3>Add Link</h3> ... <input type="hidden" name="form_id" value="{menu-id}" /> </form> </tr> To avoid a mas...

How to Apply jQuery to Elements Not Available at Document.Ready?

The website I am developing uses jQuery UI tabs to load content via AJAX (in this case, each tab is made up of a partial page). This works well, and I am happy with those results. However, one problem I have repeatedly come across is that when I include jQuery within my master.js file (which I use for site-wide Javascript), it DOES NOT a...

add css class to last column in each row in grid

I have a grid which has x rows and 6 columns. I want to add a class to the last column in each row. ...

Delay automatic url redirect with jquery?

I need a transition page that will display for 2 seconds before automatically redirecting to the home page. How do I do this? I can't seem to get delay to work for me. ...

jQuery/js val() overwriting PHPs' $_POST['field']. How to fix?

Hi, I've got a pretty complicated (for me!) form validation to do. I did all js and now I'm doing php stuff. The thing is I've put a possibility to copy part of the inputs to other, similar section (recipient -> payer). It's all done by jQuery first copying $("input.payer_sth").val() to $("input.payer_sth"), and then doing it again and...

jQuery HTML namespace element click event

Hi, I have this code in my HTML document and I would life to bind click event on such elements. <gui:button id="btnTest"> <label>Compose mail</label> <click>someaction()</click> </gui:button> I tried this two methods in my document.ready function, but none of them work $('gui\:button').click(function() { alert('clicked'); }); $(...

jQuery Validate: Remove element AFTER validation BEFORE submit?

I have a SVG map of a city that when clicked, creates hidden elements in a div in my form. I'm using the jQuery Validation Plugin to validate my form. In order to make sure that the user has clicked on an area of the map, I thought to create a dummy hidden element inside where the normal hidden elements are and put the validation rule ...

jquery and ajax where this technologies are used ?

I'm doing project where i'm going to use Jquery and ajax. I'm starting to learn this technology,i hv one doubt abt where does this jquery and ajax are used, are they used for same purpose. can anybody tell me situtation where jquery or ajax can be used both are for same purpose or different ? and any best book to start with jquery and a...

Rotating images

Hi all, Just wondering if someone can help me code the following. I want to use a fading effect to rotate a series of images (7 in total), within the CSS and code already defined below: <style="text/css"> .rotate {float: left;width: 160px;height: 215px;background-color: #FFFFFF;border: 2px solid #0066CC;margin: 0px 10px 10px 0px;text-...

JQuery if label contains this... do this

I have asp.net repeater on a page. If each item being repeated is wrapped in a label like so: <label class="ItemName">value</label> If this label contains the text '35' I want to display some text next to it. How can i do this using jquery??? jQuery(document).ready(function () { if ($('.ItemName').val().indexOf("35")) { ...

JavaScript counter

Everytime a specific action is made in JavaScript for example this: <script type="text/javascript"> $(function() { $('#typing').keyup(function () { switch($(this).val()) { case 'containment': // HERE break; } }); }); </script> inside the //HERE would be where the 'counter' was made. Then add 1 everytime the ca...

How to get the http://www.blbah.com part of the url in javascript?

My url on a page is like: http://www.example.com/dir1/file.html?a=1 I need to extract: http://www.example.com how can I do this in javascript? ...