jquery

jquery slide toggle divs without creating multiple classes, functions, etc... ui accordion

Greetings, based on the jquery ui accordion I'm using, I have added a slide toggle to my accordion list items. so what happens is I click on an li and a div slides down underneath to reveal more content. The issue I'm having is that I find myself having to create multiple id's to reference the slidetoggle. example of the div i...

Selecting a random image from a flickr set and appending it to a div

I've run into a bit of a problem and was hoping to get a little help. I am trying to select a random image from a flickr set and append it to a div to use as a background image. Here is the function: $.getJSON("http://***", function (data){ ...

using jquery, how do I check if an element is visible or not?

I also need to find out all the elements inside a div, and check for their visibility. How to do it? ...

Can someone explain this seeming inconsistency in jQuery/Javascript?? (trailing brackets inconsistency on reads)

So, in my example below, "InputDate'" is an input type=text, "DateColumn" is a TD within a table with a class of "DateColumn". Read the value of a discreet texbox: var inputVal = $('#InputDate').val(); Read the value of a div within a table.... This works: $('#theTable .DateColumn').each(function() { var rowDate = Date.parse(...

How do i POST/Submit a form using Jquery?

From This answer and the fact i may be using an anti pattern I thought i should change the ajax call into behavior like submitting a form. I found $.post but that seems to be doing ajax and does not change the page i am on. How do i submit a form with jquery or plain JS? ...

ajax call to servlet puzzler

Greetings! I'm having a problem getting a text value of a captcha from a servlet through ajax call. When my captcha gets created, its text value is written to session, but after refreshing the image itself though ajax call, I only get one old value of the text. Refreshing the image itself works ok, but I'm stuck getting the correct v...

Rails: 'if running locally' conditional javascript tag include

I want to load jQuery from http://ajax.googleapis.com/ajax/libs/jquery/1.4.1/jquery.min.js regularly, in production/development environment, as long as I'm not running locally, but my own local jquery.min.js if running locally (e.g. 0.0.0.0:3000) Reason why is that I have to do some development without internet connection sometimes, mo...

jquery file tree browser and django

hello, anybody knows a tutorial on using jquery file tree browser on django. i followed this tutorial http://abeautifulsite.net/2008/03/jquery-file-tree/ but i cant make it work, im confused with this code block: $(document).ready( function() { $('#explorer').fileTree({ root: '/windows/', script...

How might I handle a double click event using jQuery?

Is there a way to bind an event handler to a double click with jQuery instead of single click? ...

Fade In/Fade Out background color on checkbox - Jquery

I want to fade in / fade out the row background color css when a user checks a checkbox. So when they check it, the row fades in to bright yellow. When they un-check it, the row fades out to white. This is the JS I am playing with. I am using the color plugin: <script type="text/javascript"> <!-- $(document).ready(function(){...

Why is this jQuery selector so slow?

Based on testing a page with ~220 elements, of which ~200 are checkbox elements, and each element has to query an array with ~200 items, I was surprised to discover that input selector: $("input[id$='" + code + "']").each(function() { //... is approximately 4-5 times faster than $("input:checkbox[id$='" + code + "']").each(function(...

How to make image fit in div using Jquery

currently, I having a page with the layout like this: ----------------------------- Header (100%) ----------------------------- | | Desc | | unknown size | | | | 200px | | Image here | | | | | | | | | ...

replace character (space with &nbsp;) across whole webpage using javascript/jQuery

Hi, So I figured out that the replace function, that finds all single-letter "words" (prepositions and conjunction, etc.) and replace the space after them with a &nbsp; to prevent leaving these characters at the end of line, should be something like myString.replace(/\s\w(?=\s)/,"$1&nbsp;") Now how do I apply it to all text on a webp...

Fixed Bar like facebook/wibiya with jquery/YUI/prototype

Hello All, I was just wondering if any one knows of a good script to emulate a bar like wibiya or the facebook notification bar that used to appear at the bottom(just before the current facebook homepage change) . I just checked out one of the scripts but it is still under heavy development so looking for some stabler options: http://...

jQuery datepicker validation message issue

Hi, I'm using the jquery datepicker plugin at http://plugins.jquery.com/project/datepick with the datepicker validation plugin. <script id="frmValidation" type="text/javascript"> $(document).ready(function(){ var validator = $("#frmTest").validate({ rules:{ fname: "required", dobPicker: "required" ...

get gps location from mobile phone

Hello, I would like to know What is the best way to get the gps locations off multiple phones on to a googlemaps on a website. I just downloaded googlemaps with latitude on my phone. Is it only possible to query your own location with the public location badge, or can you also get the locations off your "friends". Anyone got experience...

asp.net mvc, jquery flot, and json problem

Hi, i'm trying to learn how to use flot and i think your example is a very nice, simple, very understandable code so i've been trying to implement it but... well, here is my code in the index.aspx: $(function () { $.getJSON("../../Home/JsonValues", function (data) { alert('json: ' + data + ' ...'); var plotarea = $("...

How to filter items and show items.

Hello, this is what I am planning to do. Suppose I have a list of names (in DIVs) <div class="person"> Mike Mulky </div> <div class="person"> Jenny Sun </div> <div class="person"> Jack Kickle </div> I would like a text box, where the user can type "Jenny", and filter out the DIV's with "Jenny" in them. What JQuery plugin can allo...

how to add css code on jquery ?

i have a part of css code, how can i add this css with jquery ? div#menu li:hover>div { visibility: visible; } ...

making url hover when over td the url is in ::jquery::

When hovering over a td in jquery how can i make the URLs in the td fire the "a:hover" css effect ...