jquery

jQuery callback on img src replacement?

What I am trying to do is to change an image on my webpage when the user mouses over a thumbnail of it. It is easy for me to do it this was because the thumbnail src only has 'tn_' appended to the filename and is otherwise identical. The problem I'm having is that when I switch the src on the image the attr function returns the img dom ...

JQuery Batchbook Rest API Consumption

Given the following API call in Curl, how would I do this in JQuery? curl -u #{api_key}:x -X GET https://#{your_account}.batchbook.com/service/people.xml ...

jquery ajax post does not work in IE6

$('#add-asset-form').submit(function(){ //if (validate_asset_form()) { $.ajax({ type: 'POST', url: 'wp-content/themes/tvmarketing/assetform/ajax-req.php', cache: false, data: $('#add-asset-form').serialize(), error: function(){ alert('error'); }, ...

JQuery Alter CSS Value of Left

I am trying to move a div Left a specified amount of pixels I'm using a slider that I got from here: http://carpe.ambiprospect.com/slider/archive/v1.3/ So from the example my div looks like this: <div class="horizontal_slider" id="your_slider_id" style="left: 0px;" onmousedown="slide(event, 'your_slider_id', ...

Use Google Datasource to import Google Spreadsheets

I am trying to integrate a google spreadsheet into a google visualization using google datasource. The code that I am trying to execute is below. I am not getting an error alert or anything to output from this script. <script type='text/javascript'> google.load("visualization", "1", {packages:["corechart"]}); google.setOnLoadC...

JQuery XML parsing: Replacing Tags

Hey there, I have the following XML: <?xml version="1.0" encoding="UTF-8" ?> <text> Lorem <foo>ipsum</foo> dolor sit amet. </text> and am trying to parse this XML with JQuery and replace the <foo> tags inside the response with <b></b> tags. The resulting string should be "Lorem <b>ipsum</b> dolor sit amet." I'm doing a GET reque...

How to trigger event on arbitrary function call using jQuery

I'm wondering if it's possible to use jQuery's bind() to fire a custom event when an arbitrary function is called. Something like, /* when cmsPlugin.func() is called, fire myCustom.func() too */ $.bind( cmsPlugin.func, myCustom.func ); We're using the Lightbox2 plugin for Drupal on a site. When the lightbox is displayed, I want to f...

Image resizer with 8 handles and drag & drop

I'm currently building a simple app that overlaps one image on top of another. The top one needs to be draggable and resizable. Initially I thought jQuery UI would be a good idea, there are two main issues with it: For some reason, Chrome doesn't like both behaviors even when they're imposed to different elements. I need 8 handles, jus...

Firefox opacity issue: text gets weird, colored outlines if container opacity < 1.0.

This doesn't happen in Chrome or Safari. It's a little bit noticeable in IE8, but very slight (and gray). The outline I see on both my monitors is greenish. I don't know if it's an issue with my graphics card or with Firefox's rendering of fonts at different opacities. It happens whether or not the style is set CSS statically, not using...

How to run javascript code included in a page loaded with jquery.load()

I'm using jquery.load() to dynamically load sections of a page. But I'd like the included sections to be able to execute script. A simple <script> alert("hello"); </script> doesn't run when I AJAX it in. Is there another way to dynamically load content such that the scripts will run, or a way to manually run scripts in the inc...

jQuery toggle opens all divs instead of just the next

I am using some jQuery to toggle the visibility of some div's. The toggle occurs on click and should only affect one div. The problem is that if there are multiple divs, they are all toggled on/off instead of just the one a user is trying to toggle. I think I need to use the 'next' function but can't get it working. Here is my jQuery: ...

Trouble getting jqplot highlighter going

I have been working with JQPlot for a week or so now and am banging my head against the wall trying to get highlighting working. I am loading the following CSS and .js files... jquery.jqplot.min.css jQueryCombined.css ...a couple others that don't relate... jquery-1.4.2.min.js jquery-ui-1.8rc3.custom.min.js jquery.tree.js fancybox/jqu...

sequential download using PHP and/or Jquery

Is it possible to create a web based script that would allow a user to sequentially download multiple files without causing the user to accept each forced download? Potential Process: User selects files to download. User selects directory or directory is predefined within the script. Files are downloaded to their local drive sequentia...

how to get the current sort column in a jqGrid after user clicks a column header

I'm in the beforeRequest handler, and would like to know what the current sort column is. How can I find that? ...

JQuery - disable inputs that haven't been added yet

I want to disable inputs with a particular class, however I want to do this for any future inputs added to the page. live() and delegate() can bind to events on elements that don't exist yet. Is there some sort of selector that can run some code on future elements in the same way? ...

jQuery - change function from click event to page load

Hi, I have a jQuery code inside an ascx that takes a cell content from a gridview and manipulate it, then write it to other cell. It is activated by a click on the gridview row. (Each row has a 1st cell with Word file name. The user clicks on a row - jQuey takes the file name in first cell and changes the extension to flv/mp3 - check...

How to stripe rows with jQuery while excluding some particular rows.

I'm using the following to stripe rows: $(".stripeMe tr:even").addClass("alt"); I have a table with some rows. To mark the rows for the user I set one (or more rows) to have style="background-color: red;" Is there a way to continue to use my existing way of striping rows yet leave that one row different? I want to say "Add the cl...

javascript / jQuery / CSS - vertical text ?

Hi how can I make text draw vertically, like in this site: http://cure.org/help-now/ ? I see that it's done with jQuery + SlideDeck because I see them loaded, but how exactly does the plugin do this? Firefox has css -moz-transform, but other browsers don't have such properties, and the vertical text from that site shows in all browsers...

Is it essential to use a developer key in Google Jsapi calls?

I've been using Google Jsapi like so: <script type="text/javascript" src="http://www.google.com/jsapi"&gt;&lt;/script&gt; <script type="text/javascript"> google.load("jquery", "1.3"); </script> But the Google docs recommend doing this: <script type="text/javascript" src="http://www.google.com/jsapi?key=YOUR_KEY_HERE"&gt;&lt;/scri...

jQuery: How to manipulate the contents of an iframe when the src is a different domain?

I have an iframe loading a page, and I would like to manipulate the contents. For example: <iframe id="myIframe" src="http://www.google.com"&gt;&lt;/iframe&gt; <script> $(document).ready(function(){ $(iframeContents).css('background-color', '#000'); }); </script> How can I do this? ...