jquery

How to find window restore in Javascript

Hi, How to find the window state using javascript.Consider our application need to alert('restor') when browser unmaximize and also need to alert('maximized') when restore or maximize the browser.Can anybody please help me. ...

jQuery UI toggle button events

How do I bind events to a jQuery UI Toggle button? More specifically, how can I bind events that are going to fire? The checkboxes are rendering to toggle buttons correctly, but any event handlers attached to them are not triggered when the state of the button changes. Is there something I'm missing? CSS: <input type='checkbox' id='...

How to translate prototype's $A() function into jquery?

Hi chaps, I'm trying to translate Brandon Kelly's AC.VR class (Prototype) into a jQuery plugin. Here is a link to his example (unfortunately just working in Safari). I managed to get the basics working. The problem I'm having is the mouse event history for the velocity, acceleration and friction part of the script. Here is a shorten ...

Add padding to jQuery UI Slider

Is there an easy way to add padding to the slider-bar of a jQuery UI Slider? I'ld like to be able to have the slider-handle not reach the ends of the bar. So if this is the regular left end: no padding \/ []------------------ I would like it to have padding on the left (and right) end: padding of 10px for instance \/ --[]------------...

Delay in production environment to show ajax progress ?

Is it OK to use threading.sleep in an intranet web application to display AJAX loading (in production environment)? Off course, the application works fine without it but all works too quick for the end user or even a developer to notice any difference. What is the recommended approach ? ...

Do this after visiting X amount of pages on site

Is there an easy way to track how many pages a user on your site has visited with Javascript (preferably jQuery)? I need to execute a function after a user has visited more than 5 pages on the site. I was thinking of storing the window.location.href into a variable and checking it to see if it matches the next page. If it doesn't I wou...

jquery - referencing a jquery object

So I'm using the ui library, and I have something like: $('#trash-bin').droppable({ tolerance: 'touch', drop: function(event, ui) { alert(ui.draggable.id + " was dropped"); } }); $('#images').draggable({}); Which I know is wrong (the alert says "undefined dropped") How can I reference the i...

How to set size of a select drop down menu in jquery

The normal way to do this would be: var resultSelect = document.getElementById("resultSelect"); resultSelect.size = 3; How do i do this in jQuery? Thanks in advance ...

Auto fit CSS attribute to textarea

Hi, I am working on web application. I wanted to apply auto height to textarea using CSS, dont want to use any script, jquery plugin and other stuff. After applying class ( i.e. style property ) to textarea, it should automatically increase it's height not width as per content present it in. In this case width should be fixed i.e. w...

Call a function on any event of textarea

Hi folks, I wanted to call a signle function on any event happens for <textarea>. How do I achieves this. Please do suggest me folks, jquery is preferable. Thanks, -Pravin ...

How I can detect change on Select, which is called from code?

I want to trigger .change() on select, if I change option in select element by code. I take example from jQuery documentation and added my hook to link, which after click change selected option in select. And problem is if user click on that link, then change function doesn't react. http://api.jquery.com/change/ $("select").change(fun...

How can I disable text selection on a jquery draggable?

I have several draggables on my page. When I start dragging one, it moves just fine, but the other elements on the page are getting highlighted/selected from my cursor. I noticed that the draggle demos on the jquery ui website seemed to work just fine. Does anyone have any ideas why text is being selected on my site during dragging? ...

jQuery: Load Modal Dialog Contents via Ajax

Currently my Modal Dialog is like this <html> <head> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"&gt;&lt;/script&gt; <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.5/jquery-ui.min.js"&gt;&lt;/script&gt; <link rel="stylesheet" href="http...

How can I track user visit in my website?

How can I track user visit in my website? ...

vertically scrollable image gallery

I was going through this tutorial about designing a vertically scrollable image gallery. http://flowplayer.org/tools/demos/scrollable/vertical.html Now can anyone explain me how to change these setting such that i can have more than 3 rows in a single page. Or can anyone show me a tutorial where such a vertical image gallery as been m...

jquery date validation problem

I have text box with the class=required date, it validates it, but when user manually enters 35-10-2010 where 35 is the date it submits the form and sets date to 31. How can i generate an error and prevent form submission ??? ...

Implementation of Uploadify with Zend

Okay, I have read, and tried a lot of things on how to implement uploadify with Zend, and I'm probably overlooking something, but I'm completely stuck. It seems my action isn't called. All the uploadify are placed in one directory inside the public folder. The upload button is called in a fancybox instance and is loaded from a hidden ...

Checkbox not getting checked when using jquery toggle

Hello I want the checkbox to be checked when I am using jquery toggle function. It works fine when I use the .bind('click'). $('#chkb').toggle(function () { $('#va').text("checked"); $('#chkb').attr('checked', 'checked'); }, function () { $('#chkb').attr('checked', 'false'); $('#va').text(""); }); html <input t...

How do I capture when a finger touches the screen and when a finger is removed from a screen on touchscreen device

Hi, I am developing an app for a touchscreen and I would like to capture the equivalent of the mouse down and mouse up events. For example, when the user has their finger touching the screen, a javascript function will execute, but when the finger leaves the screen function stops. I am using firefox 3.5, with the jQuery framework for...

Unmask textbox password with Javascrip or jQuery

I have a textbox for user to enter positive integer. User enters a lot of entires many time. Overtime, textbox has list of previous entries, when you start typing something similar to previous entry. Sometimes, user accidentally select those previous entries. I know this one of browser's features. Is there anyway to clear these prev...