jquery

Add thousand separators to output from jQuery Slider plugin

I'm using the jQuery Slider plugin (jqueryui.com/demos/slider/) I'm calling the plugin with the following Javascript: $(function(){ $("#slider-price").slider({ range: true, min: 0, max: 5000000, step: 100000, values: [0, 5000000], slide: function(event, ui) { $("#amount").val('£' + ui.values[0] + ' - £' + ui.values[1]); ...

Rails 3 jquery in js.erb template is creating escaped html?

In Rails 3, I've got an update.js.erb template with one simple line of jquery: $("#some_div").html("<strong>some_content</strong>"); Upon form submission, all the ajaxy stuff is working fine, but the content in #some_div is being replaced with "<strong>some_content</strong>" instead of some_content. Does anyone have a clue why? This ...

Google Chrome - $('#staylength').val(my_min); fails

HTML: <select id="staylength" name="staylength"> <option disabled="disabled" value="1">1</option> <option disabled="disabled" value="2">2</option> <option value="3">3</option> <option value="4">4</option> <option value="5">5</option> </select> In Google Chrome (5.0.375.55 on WinXP), the following jquery code fails to set the...

Need jQuery code to append parameters to all urls contained in a div

I need a jQuery code snippet which appends the parameter action=xyz to all urls within a page - note it should also check that if the urls already have other parameters appended or not: e.g., for a url such as index.php?i=1 it should append &action=xyz and for urls without parameters like index.php it should append ?action=xyz. ...

jCarouselLite: How can I get the values of the currently displayed images?

I want a jCarouselLite gallery to act as scrolling thumbnails and present a larger image next to it by somehow refering to it's currently displayed images (then selecting the first image through an array or similar). How would I approach this? The current setup - $('.carousel').jCarouselLite({ btnNext: '.next', btnPrev: '.previous',...

Using JQUERY Load, it's display "isnu2019t" instead of "isn't" which is in the DB. y?

Anyone have any ideas why a JQUERY LOAD Call which has "isn't" in the db is displaying as isnu2019t using JQUERY load? ...

jQuery Ajax Get not working

Hello, going to http://revyu.com/sparql?query=SELECT+%2A+WHERE+%7B%7D works totally fine by returning an XML file, but as soon as I use jQuery, I'm getting errors: var sparql="SELECT * WHERE {}"; var query = 'http://revyu.com/sparql?query=' + escape(sparql); $.ajax( { dataType: "xml", url : query, success : f...

User Availability using jquery and json not working on server in asp.net

I have a textbox on blur function.I'm calling a Jquery function which work call a webmethod on the cs file returning true and false.I am using JSON.This whole functionality is working on local and when i give a alert(result.d).It gives proper result when working on the server i.e 0 or 1.But when i do that on server,it returns undefined.I...

How to know when a textbox changes (without waiting for blur)?

I have an <input> textbox. I wish to call a function when it has been modified. The default behavior of the change event is to only trigger on blur, but I need to call my function as soon as the textbox's text changes and can't wait for blur. I'm not sure the best way to do this. I thought of maybe handling keydown and then testing th...

JavaScript event registering without using jQuery.

How to correctly do something like the following without using jQuery. $(document).ready(function(){ $("#someButton").click(function(){ alert("Hello"); }); }); Thanks. ...

in Google maps javascript click function is not working

Hi Everybody, My very first question in here. I am building a google maps by getting the data from json object given from external php file, in there It gets me the list of restaurants (in this case 4 restaurants) and their info, and with this info I build the markers on the map and then show the list of restaurants, and when I click th...

Textarea row number using jQuery

Y'know how textmate calculates which row and column you are on? I've been struggling to do this with jQuery and a textarea. To those who haven't use textmate, is there any possible way I can get the row number of the current textarea position? ...

Setting margin on an element according to browser height and another element's height using JQuery

I'm coding for a site with a title in a div that is tilted at 270 degrees and is fixed to the page bottom; this title changes for each page and I'd like the content to begin at the same vertical height as the title starts on page load. So say the browser is 900px high and the title is 500px I'd like the top-margin of the content div to b...

Jquery Draggable and Droppable, dropping full div content

I have a div: <div> Hello there <img src="cnnc.png" /> </div> <div id="cart"> <div class="placeholder">drop here</div> </div> and I want to be able to drag it into my droppable box and append all the content of that div to my droppable box. The problem is that my droppable code only appends text to the box, how can I change...

How to make something disappear using jQuery?

I have the following drop down: <select name="chooseLanguage"> <option>Choose One</option> <option value="java">Java</option> <option value="php">PHP</option> <option value="c++">C++</option> </select> If ANYTHING is selected from this dropdown other than the default "Choose One" which is of course preselected, then I ...

jQuery live right click

How can i use the jQuery live function as a right click listener? I've used this plugin: http://abeautifulsite.net/2008/05/jquery-right-click-plugin for right click event listening. But it isn't live, which is a problem for me. Hope you can help (btw. sorry for my bad english) Thanks in advance ...

Jquery Image Slider with a slide down

Right now it seems to work fine except I keep running into 2 errors. When .desc slides down and it goes to the next image the old .desc from image goes on top of .desc of image two. Second error is if you hove over it and then take your mouse off of it and hover over it again the .desc goes crazy and goes up and down a few times. I cant ...

Why I cannot add clientId of my textBox in the mark-up here so that I can find it with jQuery?

Hi, Simply I am trying to pass the client Id of one textBox 'txtPersonId' for the client-click event so that I can traverse to that textBox control and pass its jQuery wrapper to the loadePerson() function. This is how I decalre it in the aspx mark-up: <asp:Button ID="btnSearch" runat="server" Text="ARA" OnClientClick="loadPerson(jQue...

Pylons and NodeJS / Comet

Hi all, I'm building Pylons web applications that use a lot of jQuery and AJAX/JSON to make these apps more Web 2.0'ie. I've been looking at the server push technologies and have questions about how to do this with Pylons. I've looked at Comet and NodeJS (though I don't know much about NodeJS yet) and am confused about what would be a g...

Help on this code which tries to: Make a jQuery Ajax call to a webservice that needs to return JSON

Hello, Actually I am trying to learn jQuery Ajax calls to asp.Net webservices. I have been trying to call the webmethod below: public class Person { public string FirstName { get; set; } public string Id { get; set; } public string LastName { get; set; } public string Department { get; set;} ...