jquery

Setting the class of a div based on the contents of a link using jQuery

This is probably pretty simple but I can't figure it out! I need to parse the text inside an tag and set the class of a div based on it's contents. Here's what I need to do: <div id="targetDiv"> Content Here </div> <a href="/BookingRetrieve.aspx?ID=6463">Open House - October 21, 2010</a> <a href="/BookingRetrieve.aspx?ID=6463">Meetin...

jQuery event not defined on mouseover/mouseout...

hi i have a function that worked fine using jQuery 1.3.2 but now i am trying to run it with 1.4.2 and i get the following error "event is not defined". here is the code simplified: <div id="mapcontainer><img href="" usemap="#rage_image_map"> <div id="mytext"></div> </div> <map name="rage_image_map"> <area shape="poly" href="asth...

jQuery not even being called...

I don't know what's going on here..I'm trying to add a slidetoggle on my menu .. seems very simple .. I've tried to simplify this to try and find the problem (meaning I've taken all the links out and extra jquery, to only have that bottom example - the paragraph at the end) but I don't know what the error is.. (other that it doesn't do ...

Are there any good videos to learn programming basics which are required to learn javascript?

Are there any good video to learn programming basics which are required to learn JavaScript, then jQuery later. for the person who is already having good command over xhtml and css ? future aim is not to learn any server-side language, php, asp.net, ruby ,etc. just pure and advanced javascript/jQuery. Video for absolute programming begi...

check or not to check

I need a little bit help. Here is my url : http://fuzzysiberians.com/cfm/testRT.cfm First, the Final check box should not be available until all of the task (1-8) boxes are checked. Second, the bills paid should not be available until final box is checked. I have couple problems. I check all of the taks. Then, I check final. If I un...

Asynchronous AJAX call problem

I have a jquery Ajax call function that I use to submit form to database to save. Also use that to get data from server and show to the user. When I post\save form data, I must show a result of the post to the user whether there was an error or not. Everything works fine if I run in synchronous mode. I get the data if I want or get the ...

How to dynamically insert a <script> tag via jQuery after page load?

I'm having problems getting this to work. I first tried setting my script tags as strings and then using jquery replaceWith() to add them to the document after page load: var a = '<script type="text/javascript">some script here</script>'; $('#someelement').replaceWith(a); But I got string literal errors on that var. I then tried enc...

CSS and/or jQuery to add little clickable image to multiple select list

I have a select list with multiple rows, and I want it to have a small X image at the end of each row so it deletes that row. Any idea how I can do that through CSS or jQuery or something?? Thanks ...

jquery selector not working in IE8

This code results in an error at second line ($('boxes div.box')) <script type="text/javascript"> $(document).ready(function () { boxes = $('#boxes div.box'); images = $('#images > div'); boxes.each(function (idx) { $(this).data('image', images.eq(idx)); }).hover( function () ...

jQuery disabled button with checkbox issue

Hi guys, I have the following code which enables a button when the checkbox is checked. http://jsfiddle.net/ERfWz/1/ The following is a snippet from the code I have in my HTML page. It's much the same however for some reason it's not working. I think I may have been looking at it for too long. <script type='text/javascript'> $(func...

How to create a windows explorer-like functionality?

I am building a web application that needs windows explorer-like feature. I have implemented jQuery File Tree but that one works for left navigation only. Any ideas that I can work on or any ready-made solutions out there? Following is the PHP code that builds the ul and li tags: if( file_exists($root . $_POST['dir']) ) { $files = scan...

Is it possible to get intellisense for jquery in other js files?

I am working on a web page that has a reference to jquery and another js file with custom javascript for that page. Since the custom js file is external it isn't showing me intellisense for jquery. any way to get it to work? ...

jQuery (cross domain) .getJSON, store response in re-usable variable

I want to get the IP from the current user and send it along with an AJAX POST to a PHP file. Which means I need to re-use the variable I get in the response from the IP .getJSON request. Script 1: I found this handy snippet on snipt: $.getJSON("http://jsonip.appspot.com?callback=?",function(data){ alert( "Your ip: " + data.ip); })...

jqGrid colModel and jsonReader with no cell

The following json and jqgrid options give me no data in my grid. var grid = jQuery("#grid")[0]; grid.addJSONData({ // the json total: 1, page: 1, records: 10, items: [ { ProductID: '1', Name: 'Coke' }, { ProductID: '2', Name: 'Pepsi' }, { ProductID: '3', Name: 'L // jqGrid options { ... ...

javascript passing variables from a method with a loop to a click function

Hi, basically I'm trying to pass a variable that is defined in a JSON array that is parsed through in a for loop to be accessible in a click statement. $(document).ready(function() { getJSON(); var usedID; }); function readJSON() { for (var i = 0; i < json.array.length; i ++) { usedID = json.array[i].id; var template = $('re...

twitter style updates

How to create this effect where it looks like a newly inserted update shows up at the top of the stack and pushed the rest down? This is how it is done at the twitter home page. Update. In case this isn't clear, I am trying to understand the whole effect of how the uipdates section is animated and updated with the smooth scrolling effe...

How do I reset to default drop down list option on refresh(F5) in Firefox?

I have a ddl in firefox that does not get reset to the default caption. How do I do this? This is what I have so far. <%string ddlVal = ""%> <select id="detailSelect" name="DetailSelect"> <option <%if (ddlVal == "") { Response.Write("selected = &quot;selected&quot;"); } %> value="" >--Choose One--</option> <option <%if (ddlVal =...

Why is the YouTube video content not populating?

I am trying to get a youtube video to play in a fancybox popup window. The popup window comes up okay, but the video does not play. Firebug indicates that all the necessary elements are loading, but no video. On this page everything works fine. On this page the window pops up but no video. Here is the html: <div id="play-btn"> <a...

jQuery parent('tr') onFocus

An application that I am building uses a large table with data input fields to record data. I need to give the user a visual clue as to what table row they are on to help them navigate the form. Currently I have onFocus="HighlightTableRow()" on a dropdown list. When a user clicks or tabs to this form element, the parent table row ...

jQuery ui ReSizable with scroll bars

Hello, I am trying to have a resizable on a div, but the resizer handle is always contained within the div can I have it where scrollbars end. /////////// Edit /////////// I have achieved it with jScrollPane but after using jScroll I am unable to resize horizontally. ...