jquery

jQuery: Best practice to populate drop down?

The example I see posted all of the time seems like it's suboptimal, because it involves concatenating strings, which seems so not jQuery. It usually looks like this: $.getJSON("/Admin/GetFolderList/", function(result) { for (var i = 0; i < result.length; i++) { options += '<option value="' + result[i].ImageFolderID + '">' + re...

Add selected text into textarea (jQuery)

Need to insert selected text in the page into textarea. There must be some button to do it. ...

How can I get the length of text entered in a textbox using jQuery?

How can I get the length of text entered in a textbox using jQuery? ...

Insert selected text on the page into textarea (jQuery)

Need to insert selected text on the page into textarea. There must be some button to do it. ...

Jquery Ui Sortable showing broken image in IE8.

I have a query sortable collection of images, ie. the items is set to img (due to the fact it is in a tab control and is a horizontal list, cannot be sorted on the list items, I just can't get it to work), which works perfectly everywhere except for IE8 (even in standards compliance mode), where the placeholder shows a broken image. Is...

How to clone StackOverFlow JQuery Interface?

Is there any opensource samples of JQuery usages of StackOverFlow-like sites...... Any help in this direction?? ...

Need to optimise jQuery functions

1 set: $('#tabs li:first-child').addClass('first-child'); $('.photos li:first-child').addClass('first-child'); $('#alphabet li:first-child').addClass('first-child'); 2 set: $(function(){ $("#header-thumbs img").fadeTo("fast",1); $("#header-thumbs img").hover(function(){ $(this).fadeTo("fast",.7)},function(){ $(th...

help modding jquery plugin : jsRepeater

jsRepeater (a template engine for jquery) has output formatting that let's you pass the template engine a function that will execute before the engine renders the final value. when I'm looping through an array of values I'd like the formatting function to receive the whole array in addition to just the one value. how can I modify the ...

Javascript to set hidden form value on drop down change

New to javascript, but I'm sure this is easy. Unfortunately, most of the google results haven't been helpful. Anyway, I want to set the value of a hidden form element through javascript when a drop down selection changes. I can use jQuery, if it makes it simpler to get or set the values. ...

How to make live custom events in jQuery

jQuery has a really handy event binder called live() which will add events to DOM elements on the fly (even for the elements that will be added later to the DOM). The problem is that it's only working on specific events (listed here in documentation). I really want to have live events for focus,blur and change which is not supported by...

jQuery click function vs inline onclick

I'm trying to reorganize my code and make it more unobstrusive. Mainly, there is a link for performing an action. If you click on the link, the action is performed via ajax (the ajax code is not on the code here) and the text is replaced by other text, offering the user the ability of undo the action. If the user click the Undo link, aj...

How to loop through Google Map coordinates?

I'm stuck trying to loop through this array of GPS coordinates that puts pins on the google map. Here is my code: http://pastie.org/466369 The problem is on line 27-36. If I change it to the following, it will place 1 pin on that exact location, but I want it to loop through the array so I can add multiple pins: //var markers = []; ...

Comparing performance - htc vs jQuery

I have a (IE only) web app which now uses htc to render html widgets. I am considering migrating the app to jQuery. How does the performance compare between htc and jQuery. ...

jQuery: Why can't I access the event object in my scroll event?

I want to access the original event object but the object returns undefined.. $(window).scroll(function(event) { alert(event.pageX); }); I'm just trying this out if it will work. The example is as basic as possible so I can work out other events too. ...

Need help Reverse Geocoding to append message to GLatLng coordinate.

My code: http://jsbin.com/epuxu With help from SO, I managed to get addresses geocoded and their according pins placed on the map. The problem is that I can't select the coordinates in order to append a #message div to it on the map because I don't have the coordinates anymore. I suspect I'm doing something wrong in this section: /* M...

how to get the image inserted from the tinymce editor ?

Hi, I am trying to use the tinymce text editor, but am not being able to get the contents of the editor using jQuery , and also if I use the simple post method to get the value I get the text, but am not getting the image? The code I tried using jQuery was: $(document).ready(function() { $("#save").click(function() { $....

jQuery double animation using the jquery easing plugin

Hi guys, I want to implement something like this page does: link text Look at the Clicker box. The box has two animations going on. One for the easeInQuad, then the other animation is for the easeInOutSine. How can I implement something like that in my own function? $(function() { var iH = window.innerHeight + 80; var posi...

jQuery: Need some help.. The callback function of .animate isn't working

Hi, I want to have some kind of bounce effect in my animation plugin but it isn't working. The callback isn't called at all: $(function() { var offset = $("#first").offset(); var position = $(window).scrollTop(); $(window).scroll(function() { var scroll = $(window).scrollTop(); if (scroll>position) { $("b...

How to implement ajax voting application using the Grails Framework?

any good samples of code or articles that can help? ...

Making a truly destop like table grid (how to show enough empty rows to fill the height of table grid)

I'm really concerned about the aesthetic aspect of my web app and that's why I'm asking this sort of a silly question. Forgive me in advance if you think it's not that much a big deal. I'm building a desktop like web app and using jqGrid awesome plugin to show some tabular data. In desktop applications like iTunes, the table has enough...