jquery

Reset after using a link with parameters

I am using the window.location.search parameters (www.mysite.com?page=1) to direct the user to a specific page within the site. However, since those parameters are still in window.location (the browser) reset button continues to re-direct to the same page. I would like the reset button to re-direct to www.mysite.com How do I clear the ....

Can I replace or modify a function on a jQuery UI widget? How? (Monkey Patching)

If I want to tweak some of the capability of a jQuery UI object, by replacing one of the functions, how would I go about doing that? Example: suppose I wanted to modify the way the jQuery autocomplete widget rendered the suggestions. There's a method on the autocomplete object that looks like this: _renderItem: function( ul, item) { ...

Graphical Countdown in Jquery/Javascript/ASP.NET

Hi designers/developers, I am looking for a way of graphically showing a countdown. I am working for a large Hospital and have written an Ambulance page that shows ambulance arriving in a datagrid with the time of arriving at the hospital in minutes and seconds (plus other info). They have asked me for somehow visually representing the i...

jquery animate browser window

Hi, Is there a way to animate a browser window using jquery. Right now I'm essentially using this: $(window).animate({ left: '+=50' }, 5000}); The reason why it isn't working is probably obvious, although not for me. I eventually need to loop an animate effect so that the browser will move back and forth dynamically. Thanks. ...

Jquery JCarousel, itemLastInCallback how to change out the controls

I am new to js and Jquery other than plug and play scripts and plugins. I have Jcarousel running great on a Ruby on Rails site and I need to use the itemLastInCallback method to change out the next and prev buttons. Basically if the end user clicks through to the last item in a carousel, the next button would become a link to the next ...

How come jQuery can't remove this element?

I have a table like this: <table id='inventory_table'> <tr id='no_items_avail'> <td> There are no items in the database. </td> </tr> </table> And I want to get rid of it with jQuery like this: $('#inventory_table tbody tr#no_items_avail').remove(); However it doesn't seem to be working at all. What am I doing wro...

jQuery image crossfader problem

Hey!, I have a image switcher fadein/out (it will crossfade iamges - auto(1 - x) ) and a pager but i cant manage to make the image rotation listen the click action on pager, when clicked on pager the image will NOT jup tu the specific img. The problem is in the rotate function the triggerID will hold the "rel" num of the current pager-...

What should a PHP generate to give back to a jQuery AJAX request?

Perhaps it's a syntax error, but I never assume that. I have a -dead- simple AJAX test set up: http://www.mcphersonindustries.com/bucket/api.php is a file with simply: <?php echo "test"; ?> And I have Apache as localhost with this jQuery bit running: $(document).ready(function() { function doAjaxPost() { $.ajax({ ty...

jQuery - how to repeat a function within itself to include nested files

I'm not sure what to call this question, since it involves a variety of things, but we'll start with the first issue... I've been trying to write a simple to use jQuery for includes (similar to php or ssi) on static html sites. Whenever it finds div.jqinclude it gets attr('title') (which is my external html file), then uses load() to i...

What JS framework offers scroll functionality (+animation) in a div without a scrollbar?

All: I want to scroll through a sequence of tumblr/twitter posts as a long sequence of texts. Let's say we have: <div id="mainContent"> _some content_ </div> where the css for mainContent is: #mainContent { padding: 20px 20px; background: #FFF; height:500px; overflow:hidden; } I really like the functionality...

jquery tableeditor

hi, im trying jquery tableeditor (http://dev.iceburg.net/jquery/tableEditor/demo.php), but it doesn't work. I m using jquery-1.4.2, and i see tableeditor recommend 1.0.3, does it mean it won't work in jquery 1.4.2? Thanks. ...

how to get the mouse's offset(left and top on the maps) when i clicked the google maps.

it would be like this : <div id="map_canvas" style="width: 500px; height: 300px;float:left;"></div> left:(<=300) top:(<=500) GEvent.addListener(map, "click", function() { //aFn() }); i want to make a polyline when i clicked: var polyline = new GPolyline([onePoint,twoPoint], "#ff0000", 5); ...

how to get the mouse's offset when i mouseover a element..use jquery

this is my code and have a error: $('#map_canvas').mouseover(function(e){ console.log(e.offset().left+' '+e.offset().top) }) thanks i do this ,and it is always log (0, 0): $('#map_canvas').mouseover(function(e){ var offset = $('#map_canvas').offset(); console.log(offset.top+' '+offset.left); //offset of 'rea...

Why won't this DOM element disappear?

I have a page that uses jQuery with a small glitch. I managed to get this down to a simple example that demonstrates the problem: <html> <head> <script type="text/javascript" src="jquery.js"></script> <script type="text/javascript"> function hideIt() { $('#hideme').fadeOut('slow', function() { $(this).remove(); } ); } </script> <...

Posting Static & Variable length data to the Server with JQUERY & Coldfusion

I'm looking to post the following type of data to a server using JQUERY & Coldfusion: foodID - int foodDESC - text html text from a WYSIWYG (CKEDITOR) --there will always be just 1 foodID and foodDESC per POST to the server but there can be a variable number of: locationID - int LocationDesc - text --There can be 0-8+ of these. Should...

How would you compare jQuery objects?

So I'm trying to figure out how to compare two jQuery objects, to see if the parent element is the body of a page. here's what I have: if ( $(this).parent() === $('body') ) ... I know this is wrong, but if anybody understands what I'm getting at, could they point me towards the correct way of doing this? ...

Why can't I fade out this table row in IE using jQuery?

I can't get the table row to fade out in IE. It works in Chrome, but not IE. It just becomes really 'light' and stays on the screen. I tried IE8 with and without compatibility mode. <html> <head> <script type="text/javascript" src="jquery.js"></script> <script type="text/javascript"> function hideIt() { $('#hideme').fadeTo("slow", ...

JQUERY/JSON, given a variable list of items, how to post to the server

I have a .each() that is running a loop to find the following below.. Given the following which builds during the .each loop id - desc 313 - blah blah 213 - blah blah 313 - blah blah 323 - blah blah How can I form this data in JQUERY to be posted to the server (coldfusion) ...

calling a function or communicating from one browser window to another using Jquery / javascript

Hello, I am designing a web site that plays music. The music player itself will be in a separate window along with the now playing list. I want to be able to refresh the now playing list when a new song is added to it from the main window. Essentially I need to figure out how to communicate between the two windows. I was only able to f...

How to create a JSON Object {"x":"16","y":"XXXX"}.... in JQUERY?

Given the following: What I would like to happen: 1. Find all Span TAGS with class="location" 2. Loop through these and create a JSON string to post to the server // Determine how many there are var postText = $("#container").html(); var numFound = $("span.location").length; var countVar = 0; //Loop through all the Locations $( "span....