jquery

Using JSON input in Ruby method on Rails

I am using jQuery to make an AJAX call to a ruby method in my controller. The javascript looks something like this: var latLongJSON = { "address": [ {"lat" : 50, "long" : 50} ] }; var returnedAddresses; $.ajax({ type: "GET", data: latLongJSON, url: "map/getaddresses",...

Background Image Overlapped Problem with jQuery

Hi, Here is my working page. I attached buttons to white bishop and you can move around but left images are overlapped by right images. I think the problem is with CSS. The brief structure is here. <script> $(document).ready(function(){ $('#top').click(function(){ $('#p81').animate({top: "-=64px"}, 10...

Given the following JS/JQUERY, how to prevent it from being case sensitive

I have the following line of code which works well: $("a.grouped_elements[href$=.jpg],a.grouped_elements[href$=.png],a.grouped_elements[href$=.gif]").fancybox(); Problem is, if the href is .JPG it doesn't work it only works with .jpg. How can I make the above case insensitive so either all caps or no caps or a mix all match for the fi...

remove a keyword from a statement

i want to remove a particular #keyword from a string. i dont know its position or anything. can i use javascript to do it? ...

JavaScript: Alternative to JQuery's (dual) Slider control?

I am using the JQuery Slider control for use as a double sided slider (dual slider). It's a great UI control but I'm looking for an alternative that isn't so "fat". Right now, just for me to use the Slider control, I have to include: JQuery core JQuery UI core JQuery Slider plugin When I both minimize using Google's awesome Closu...

FancyBox, Obtaining an ATTR of the item clicked

I have the following lines of code: $("a.quickview").fancybox({ ajax : { type : "POST", data : 'itemID=' + $(this).attr("name") } }); Which is binding on: <a name="614" class="quickview" href="/URL/index.cfm">quick view</a> I want data to post as itemID=614, but $(this).attr("na...

jquery clickling fast

Hi. I have this function, that adds 31px to my style bottom on ul. It works fine, but if I click fast, it no longer adds 31px, but some weird number like 17.423px. I guess it's because the animation isn't done, and thereby by clicking fast it adds 31px to the current px amount. My thought is that I need to insert a stop(). But where? Th...

jQuery multiple events to trigger the same function

Is there a way to have keyup, keypress, blur, and change events call the same function in one line or do I have to do them separately? The problem I have is that I need to validate some data with a db lookup and would like to make sure that there is no way that the validation is missed weather it is typed or pasted into the box. ...

Simple jQuery Toggle of children

Um, why no worky? Trying to toggle a ul with this: $("#others").children(".btn").click(function(){ if ($(this).children("ul").is(":hidden")) { $(this).children("ul").slideDown(); } else { $(this).children("ul").slideUp(); } }); And: <div id="other"> <div id="galleries"> <a href="#" class="btn">Galleries >> ...

slidepanel/hover help

I'm trying to create a menu navigation system from the top of the page. I want it so when I hover over the link, it drops down (the link drops down; so it'd be as if there was a whole field being hidden beyond the 0px mark) with the related field. I've gotten it to work, somehow but it still isn't right. A few issues are: when I hover...

Coordinating 3 instances of Cycle on one page

I have 3 images, all same size, across top of page horizontally. I'd like to use Cycle to fade each instance very slowly, but I'd also like make sure the transitions do not start all at the same time, but are staggered. Is there somewhere this can be specified? If anyone can recommend a very slow fade rate, plus a way to prevent all 3 fr...

Jquery if visible conditional not working

Hey, I have a page going here that uses jQuery: http://treethink.com/services What I am trying to do is, if a slide or sub-page is shown in there, change the background colour and colour of the button. To do this I tried saying, if a certain div is shown, the background colour of a certain button changes. However, you can see there tha...

Click behaviour - Difference in IE and FF ?!

Hey folks, i just came to the conclusion that a project i am currently working on might have a "logical" error in functionality. Currently I'am using server technology with PHP/MySQL and JQuery. Within the page there's a normal link reference with tag <a href="contentpage?page=xxx">next step</a> The pain point now seems to be the g...

Parsing XML with jQuery... problem retrieving elements

An XML snippet: <results> <review> <api_detail_url>http://api.giantbomb.com/review/1/&lt;/api_detail_url&gt; <game> <api_detail_url>http://api.giantbomb.com/game/20462/&lt;/api_detail_url&gt; <id>20462</id> <name>SingStar</name> </game> <score>4</score> </review> </results> And ...

jQuery Plugin: Adding Callback functionality

I'm trying to give my plugin callback functionality, and I'd like for it to operate in a somewhat traditional way: myPlugin({options}, function() { /* code to execute */ }); or myPlugin({options}, anotherFunction()); How do I handle that parameter in the code? Is it treated as one full entity? I'm pretty sure I know where I'd p...

Using jQuery, hide a textbox if a radio button is selected

I have 2 radio buttons, what I want is if a user selects the top radio button then hide a textbox. Not sure how to bind an event to a radio button. ...

Javascript table construction bug using JQuery in Firefox on Mac OSX

I'm using some code to build up tables using JQuery, but in Firefox 3.5.3 on Mac OSX, the table cells all appear on separate lines by themselves, instead of in their respective rows. Chrome 5.0.342.7 beta on OSX correctly produces the table, as does Safari 4.0.5. Here is a minimal reproduction case: <html> <body> <script type="text/jav...

How can I check all of the bindings for an element with jQuery?

I have some elements and I'm using some jQuery plugins. I want to see if the elements are already bound to events. ...

Searchfield with autocomplete ASP.NET and Database

Searchfield with autocomplete I would like to make a searchfield with autocomplete, so when you write like 2 or 3 letters it will show a dropdownlist with results that match a column from a table in the database. I have been reading all over the internet, and i have found out that it can be done with jQuery and AJAX Control Toolkit. ...

jQuery,and other library right order to include?

I have wordpress theme that use mootools and jQuery. I use jQuery noconflict to avoid conflicts of js libraries; this didn't help me. Can someone help me with right order of including js libraries on my wordpress theme. Thanks in advance. ...