jquery

Can I change a web page's scale?

Hi folks, I really would love to scale webpages down or up. Is there any way I can implement this? ...

jquery scroll speeds

Hi, I'm using the following code to scroll a layer according to mouse position: $(".icons").animate({scrollTo:x},duration); It works find however, I'm finding that the scroll speed is much faster when going to the right. Also noticed that if the scroller starts on the left and scroll to the right just a little bit and then scroll ba...

jQuery Ajax Drop Down

I have a drop down that when clicked makes an ajax request to update the drop down with the latest stock levels. When I click the drop down the request is made and the drop down gets updated and drops down with the latest data. Problem is when a user selects an option the Click ajax request is made again stoping an option from being sel...

Do I need to use tbody, it looks like the browsers are generating it anyway

I do like this on my document ready: $("thead").addClass("ui-state-default"); $("tbody").addClass("ui-state-highlight"); And I noticed that the class is added also to the tables that don't have tbody, I tested on all browsers. Should I ever bother to write tbody when i generate/write my HTML? ...

Implementing multiple file upload control in jquery tabs

Im using asp.net mvc 2. I have three jquery tabs. In each of three tabs i want to upload multiple files and save on server. what may be the best approach to do this also i want to implement ajax base file upload ...

jQuery animate() to hide and show elements by sliding left and right

I'm trying to animate something using jQuery. You can view it here UPDATE I have it working the way I want it. This is the jQuery: $(document).ready(function() { // go chat button $('#go-chat input').click(function() { $('#search, #go-chat').animate({width: '0px'}, 1000, function() { ...

Drop-down list dependent form

Hi, i think its a simple answer but not sure on the best method and i am new to forms. I want to have a drop-down list with model numbers in. When a certain model number is selected it displays a form with the appropriately named inputs. e.g. Model 1 - when selected - displays input field 1 and input field 2 Model 2 - when selected ...

How to make the Textbox field accept only Decimal Values in jquery

How to make the Textbox field accept only Decimal Values ...

IE8 and jQuery selectors

Hi all, Today it came to my attention that a combination of jQuery selectors and the addClass() function does not work properly on IE8. For example, when I want to ensure that even-numbered rows are selected in a table, I wrote: jQuery(document).ready(function($){ $("#table1 tr:nth-child(even)").addClass("even"); } And for the C...

jQuery: how to get "value" of file upload input field

Is it possible to determine if the user has selected a file for a particular input type="file" field using javascript/jQuery? I have developed a custom fieldtype for ExpressionEngine (PHP-based CMS) that lets users upload and store their files on Amazon S3, but the most popular EE hosting service has set a max_file_uploads limit of 20. ...

Automatically build a nested model form with using the 'link_to_add_fields helper'

Ive created a nested model form the RailsCasts Nested Model Form Part 2 example and have it working with Rails 3 and JQuery. Currently, a user can create a new project and click a link to add new tasks, and within each new task, click a link that will allow them to add new assignments to each task. Here's the link to create a new task ...

$.ajax() control does not enter success or failure but fire bug console i am getting the json response ok

The following is the json response {"d":[{"__type":"Treking.Data.Users.Owner","MembershipId":null,"FirstName":"siva","MobileNo":"9886811237","EmailId":"[email protected]","PhoneNo":""}]} Client Side js is as follows function GetInfo() { var checkboxInfo = $('#&lt%= chkboxContact.ClientID %&gt'); var domcheckboxInfo= che...

jquery form validation issue

<script type="text/javascript"> jQuery.validator.addMethod("steam_id", function(value, element) { return this.optional(element) || /^STEAM_0:(0|1):[0-9]{1}[0-9]{0,8}$/.test(value); }); jQuery.validator.addMethod("nome", function(value, element) { return this.optional(element) || /^[a-zA-Z0-9._ -]{4,16}$/.test(...

Highlight text as you type on textarea

Hey all, I'm trying to create a textarea that will highlight some keywords as the user types in there. I understant textarea can only support plain text and that I have to use a 'rich text' editor in order to achieve this. I would like something really simple though and not the bloated 'rich editors' out there. Any ideas? Thanks! ...

How to force jQuery animations to run simultaneously?

I have a web page with animations (JQuery Animation) all over the place. A typical animation sequence may contain three or four objects animating independently at the same time. The issue I am facing is that the queuing of the animations is not predictable. Some of the animations are running simultaneously while some others are not. I a...

jQuery Draggable() and keyboard control

Hey there, I have a page with the jQuery Draggable() enabled on #person and that #person is constrained to #map. (link to plugin: http://docs.jquery.com/UI/Draggables/draggable ) However, I have also added control with the Arrow keys on the keyboard. Now, they all play well together until I get to the edge of the constrained area (the ...

Static reference to a <div> tag in jQuery?

I am still quite new to jQuery and I am trying to setup the jQuery.Validate plugin so that it displays all of the error messages below the submit button instead of all over in the document. I have a table of options with a check box on each row. The no check box selected error message shows on the first row of the table which will cause ...

respond_to change response type

Hi! I am calling a controller's create action via ajax so when the object saves successfully, the js response is triggered. However, if the object fails to save due to validation, then I want the response to be html. I hope to achieve this by not returning the js response in the else block (please see code below) but this produces a 406...

How do I combine multiple events in a jQuery UI autocomplete?

In the code below, I have the same function on three different events (focus, select, change). This seems redundant but I can't figure out how to combine the three into one. Thanks in advance for any ideas! $("input[name^='addSchool']").autocomplete({ source: function (request, response) { var temp = $("input[name^='addSchoo...

clientHeight returns defferent values depending on the mode IE8 is in

In a javascript function i use document.body.clientHeight to get the height of the body. Now depending on the mode IE8 is in i.e quirks or standard, the value is different. Example In quirks, document.body.clientHeight = 800px In standars, document.body.clientHeight = 650px Hope i've made sense. Please help. ...