jquery

jquery click on anchor element forces scroll to top?

http://stackoverflow.com/questions/720970/jquery-hyperlinks-href-value[link text][1] I am running in to a problem using jquery and a click event attached to an anchor element. [1]: http://stackoverflow.com/questions/720970/jquery-hyperlinks-href-value "This" SO question seems to be a duplicate, and the accepted answer doesn't seem to...

Get key/value from selected Autocomplete item

I am using this jquery plugin. I've looked at the documentation but I'm still not sure how to get the key value from the selected item. http://bassistance.de/jquery-plugins/jquery-plugin-autocomplete/ ...

ASP.NET: jQuery AJAX 'data' param problem

I've been having problems with this code I had spent the last 3 hours digging around and trying to find an answer. As I wasn't successful, I will just post the code and ask which kind of parameters I should have on my web service to handle this request: var args = [{ key: 'myId', value: 'myValue' }, { key: 'myOtherId', value: 'myOtherVa...

jQuery should I use multiple ajaxStart/ajaxStop handling

Maybe there is no difference, but is either way better than the other (or perhaps a mysterious 'third' way better than both!)... first: var startTime; $(document).ready(function() { $("#lbl_ajaxInProgress").ajaxStart(function() { // store the current date/time... startTime = new Date(); // update labels $(this).text('...

Missing ) in paranthetical in JQuery

Hi, In JQuery ajax Get i am using like the following, var htm = $.ajax({ type: "GET", url: "http://localhost/cake_1.2.1.8004/index.php/forms/getFormEntry", async: false }).responseText; alert(htm); var myObject = eval('(' + htm + ')'); alert(myObject)...

[jQuery] jquery.gridLayout + filterable div boxes --> not resorting

Hey Guys, i m from Germany so please don't judge me for my bad englsh skills. I posted this question in some other communitys but nobody could help. So i'll just hope for the best here. I not a jscript pro or anything. Im just putting stuff together and hope it works. So here is what i did. I took the tutorial from nettuts+ about the "...

jQuery Shopping Cart

Hi all, i want to use shopping cart in my portal. can i get shopping cart plugin for jquery? Gnaniyar Zubair ...

jQuery toggle to change image

I have a list of divs with images in them: <div class="wizard-img"><%= image_tag("sources/pix/nyt.png") %></div> <div class="wizard-img"><%= image_tag("sources/pix/theguardian.png") %></div> When a user clicks the div, I'd like it to change the image to x-on.png, when clicked again, it'll change to x-off.png, and when clicked a third ...

jQuery html() acting really slow

I was testing something I read earlier about how random Math.random() really is, and wanted to display 10000 numbers that was supposed to be a random number between 0 and 10000000. To see the test, I chose to just join the array of random numbers to a string with <br> between each integer. And then I just did $("#"+elm).html(randomNumbe...

jQuery: Creating a New DOM element and showing it

So as the title suggests I wish to create a new dom element (the HTML is generated and retrieved via AJAX). I kind of got it working but it appears hidden, and when I try to Fade In it breaks! function AddContent(Content) { div = document.createElement(Content) div.appendTo($("#contentAreas")); // $(div).f...

Trying to get jCarousel to fetch new set of records on click of Next button

I've been trying for the last 2 days to get this thing to call my getJSON and fetch a new set of records based on the carousel.last value when you click the next button. It loads 3 pictures on start up just fine but the next button is not enabled because I only have 3 loaded and there are no more lingering in the queue. I don't want an...

Is it possible for jQuery to read CSS setting BEFORE any html components created?

Hi! I need to read CSS settings for the div's width and height etc in jQuery to arrange the divs (hundreds of them) in proper position in the page. I know it is possible to read an existing div's actual size/position. But my requirement is to get the info before the div even exists. Anybody? Thanks! Sorry, I didn't make it clear enough...

How do i add a query string pair to an existing url in jquery

I am aware that I can access all external links on a page using something like: // Get external links $.expr[':'].external = function(obj){ return !obj.href.match(/^mailto\:/) && (obj.hostname != location.hostname); }; does anyone know how I can add a query string pair (along the lines of ?aid=1234567) to the URLs in the exter...

Inserting a text where cursor is using Javascript/jquery

I have a page with a lot of textboxes. When someone clicks a link, i want a word or two to be inserted where the cursor is, or appended to the textbox which has the focus. For example, if the cursor/focus is on a textbox saying 'apple' and he clicks a link saying '[email]', then i want the textbox to say, 'apple [email protected]'. How ...

Strategies for auto completing a text box with ajax

How does youtube, google, facebook and even Stackoverflow achieve great performance with their auto-comlete boxes? It's really fast and feels like its a local search even though in the background they are probably calling a DB. (Imagine all the resources needed for a DB call!) Is it ALL about Server and bandwidth? What are the strategi...

What context is the jQuery.post callback function invoked in?

Lets say for example: $(".button").click(function() { $.post("commandrunner.php", { param1: 'value', param2: 'value2', param3: 'value3' }, function(data, textStatus) { $(this).parent().after('<p>button clicked</p>'); }, "json" ); }); I ra...

JQuery, event bubbling on table cells. How to work out which row is clicked on

I have table enclosed by a div that looks similar to this....... <div id="records"> 10 | text1 | Delete 23 | test2 | Delete 24 | text3 | Delete 32 | text4 | Delete </div> I'd like to make the "Delete"s clickable which calls an ajax script to remove them from the database. Each of the 'Delete's has a class of "delete_record" The ta...

jQuery replacement for Default Button or Link

As everyone knows, that default button doesn't work in FF, only IE. I've tried to put in the tag or in the and it's not working. I've found a js script to fix this issue, but for some reason it's not working for me. This script for a submit button, i need to use it for a LinkButton, which is should be the same. Link: <div id="pnl">...

How to set callback on single items using jQuery

I have a js function which has, until now, always been the callback for a click event, and therefore relies heavily on the 'this' pseudo-variable. 'this' is a <li> element. However I now have a circumstance where it is sometimes triggered using more convoluted route, and in these circumstances 'this' is an entirely different element. Ho...

efficiency of cloning dom nodes

I'm building an application where I end up with a fairly long list of repeated elements that need to be configured based on some objects I'm getting via AJAX. I'm thinking about creating one of these elements in html and leaving it hidden on the page and then cloning this element and using jQuery to modify it based on the object I'm gett...