jquery

change html text from link with jquery

Hello, a simple question here Is there a way to change the text "click here" <a id="a_tbnotesverbergen" href="#nothing">click here</a> in this link Richard ...

Passing values from jQuery to PHP

Here's the situation: I'm using jquery.validate.js to validate my forms, but I need to add a server-side validation layer. jQuery Validate uses class names within form-elements to determine what it should do -- I want to fetch those class names into PHP so that I can perform the same validations on the server-side. I'm hoping to do ...

jQuery manipulating DIV but not its child elements

This is my layout: <div id="outerwrap"> <div id="innerwrap"> <div id="centerc">...</div> <div id="rightc" style="font-weight:bold"> </div> <div style="background-color:White;height:10px;top:284px;left:0px"></div> <div id="leftc">..</div> </d...

Trigger change event of dropdown

I want to trigger the change event of dropdown in $(document).ready using jquery. I have a cascading dropdown for country and state in user details page. how can i set the value (which is taken from DB based on the user id) for country and state in MVC with C#. ...

Jquery: Checking to see if div contains text, then action

I'm trying to check in jquery if a div contains some text, and then add a class if it does. So I wrote something like this: if( $("#field > div.field-item").text().indexOf('someText') = 0) { $("#somediv").addClass("thisClass"); } I'm not getting this to work. <div id="field"><div class="field-item">someText</div></di...

jQuery.Scrollable Plugin

Hi, I am using the following plugin: http://flowplayer.org/tools/scrollable.html and under the sub-heading of "Scripting API" - there is a method as follows: getItems() jQuery Returns the scrollable items as a jQuery object My question is - how can I access this object to obtain its values, such as id and name of all the sc...

jquery select divs with same id

hei guys i want to select two divs with the same id in jquery. how do i do it? i tried this and it did not work jQuery('#xx').each(function(ind,obj){ //do stuff; }); i have jquery countdown timers in a page, and i update them via ajax. some of these countdown timers repeat and that is why i need to use the same id on the divs. ...

iphone keypad 'go' won't work jquery submit

Hello, I have a form on a page that has a submit button. If I hit the submit button it posts a jquery POST to another page and logs a user in. Works fine if I use the submit button on the page. If I click 'Go' on the numeric keypad it just refreshes the page. I assume this is because he form is like this (using iWebkit)... <span class...

.droppable doesn't seem to trigger anything? JQuery + ASP

Hi All, With the help of the stackoverflow community, I've got the dragging to work perfectly using JQuery. Now, I've assigned a .drop class (and made it .droppable), but whenever I drop a .draggable onto the .droppable... nothing happens! Is there an error in javascript? <script type="text/javascript"> $(document).ready(function()...

properly disabling the submit button

this is the code that I use to disable the button $("#btnSubmit").attr('disabled', 'disabled') $("#btnSubmit").disabled = true; and this is my submit button <input id="btnSubmit" class="grayButtonBlueText" type="submit" value="Submit" /> the button although looks disabled, you can still click on it.. This is...

Passing Arrays into a jQuery PlugIn

Hi, I am looking at modifying a jQuery Plugin to cater for an additional requirement I need. Sorry, not a programming question, but can you pass an array from javascript into a jQuery plugin, that will maintain all it's information or do I lose the array content between javascript and jQuery Plugin? Thanks. TT. ...

Colums resize when using JQuery UI's toggle in IE

Example code: <html> <head> <script src="jquery-1.3.2.min.js" type="text/javascript"></script> <script src="jquery-ui-1.7.1.custom.min.js" type="text/javascript"></script> </head> <body> <table border="1" style="width:100%"> <tr> <th>1</th> <th>2</th> <th>3</th> ...

How to select second element with JQUERY when clicked on image ?

The code below working for only first div. I can't display other divs when i clicked on the other "img"s. Do you know a method to reach second (next) element? $(document).ready(function() { $('.imgOpenClose').click(function() { if ($(this).attr("src") == "images/openTree.gif") { $(this).attr("src", "...

jQuery: What is returned if $('#id') doesn't match anything?

What is returned if $('#id') doesn't match anything? I figured it would be null or false or something similar so I tried checking like so: var item = $('#item'); if (!item){ ... } But that didn't work. ...

how to exclude second column from selector

Hello, my question is how I can change the selector so that it wil exclude the second column off the hover event I did try some other variations like nth-child, but no luck yet. Could there be something wrong with the syntax maybe?? $('.row_class td:not(:eq(1))').hover( thanks, Richard ...

retrieve window.location.hash url in php

I am using a jquery tabbed interface here http://www.imashdigital.com/#2 and would like to return the tab number in php. Ideally I would like to run a javascript function (on a timer) that continually updates a global php variable with the current tab. Based on this php value, 1 through to 4, I will then load a different sidebar. I wo...

Reusable JQuery Modal Dialog Box?

Hi - I've been using jquery on and off for the last 6 months. I have a form where I want to replace 20 different javascript alert(""); statements with jQuery Modal Dialog boxes. I don't want to create a separate dialog div section for each different message. Is there a way with base jquery-ui to create a reusable modal dialog box wher...

Finding sum of selected in flot

If I bind a function to flot's "plotselected" event, is there a way to get the main series indexes of the start and end points of the selected area? I saw that with "plothover" you can use the "item" variable, but it's not clear if that works for selections. Plus, I don't want to have to iterate through the entire series each time the f...

How do you test that a modal jquery dialog has lost focus?

I want to close the dialog box when you click outside of the dialog, but I'm not sure how you test that in jquery/plain javascript. Some have suggested using the blur event, but this doesn't seem to be supported by jquery dialog. ...

JQuery - Storing ajax response into global variable

Hey All, Im still somewhat of a newbie on jQuery and the ajax scene, but I have an $.ajax request performing a GET to retrieve some XML files (~6KB or less), however for the duration the user spends on that page that XML content should not / will not change (this design I cannot change, I also don't have access to change the XML file as...