jquery

Center DIV contents to viewport

I'm trying to create a carousel similar to http://www.aprica.jp/, using jQuery and HTML. To do so, I need to be able to horizontally center the contents of a large (overflow-hidden) div to the viewport. Any ideas how I can do that? ...

Make textarea readonly with jquery

For text input I do: $('input[type="text"]').each(function(){ $(this).attr('readonly','readonly'); }); But what should I do for textarea, to make it readonly. ...

What is the best IDE for JSP, JSTL and jQuery development

Hey everyone. Being a Dreamweaver user (with some past flirtations with Aptana), I'm now looking for a windows-based IDE that provides the following features: Requirements: Code completion / hints on JSP / JSTL code (tags mostly) Code completion / hints on jQuery code Ability to automate repetitive tasks (uploading to remote server, ...

how to preload large size image?

i have certain links, on mouse over of those links I am changing <div> background image jQuery I have used is- function imgchange() { $('.smenu li').mouseover( function(){ var src = $(this).find('a').attr('href'); $('.hbg').css('background-image', 'url(' + src + ')'); $(this).find('hbg').attr('title...

Problem getting substring in jquery

I have a string variable having data 4096;jpg,bmp or 2048;flv,mpg I want to split this string into two string in jquery on the basis of ; ...

Problem with jQuery autocomplete and lucene

I use jQuery autocomplete in a jsp and get my searchresults from a servlet, where a Lucene Index is searched against the given term that should be autocompleted. Thats the code of the autocomplete in the jsp: $(document).ready(function() { $("#QRY_ItemQuickSearch_enc").autocomplete("<%=autoSuggestAction%>", { onI...

How can I make a javascript/jQuery countdown that is only visible after X minutes?

Hi folks, After the users have been inactive for X minutes, I need to display the number of minutes left till the session times out in ASP.NET. For e.g. after 5 minutes, they will see 'You have been inactive for 5 minutes. You will be logged off after another 10 minutes'. Each minute after that, the message will be updated. I found a...

jquery charcode error

Hi, i have this simple form validation in jquery: <script src="http://code.jquery.com/jquery-latest.js"&gt;&lt;/script&gt; <script type="text/javascript" src="http://dev.jquery.com/view/trunk/plugins/validate/jquery.validate.js"&gt;&lt;/script&gt; <script type="text/javascript"> window.onload = (function(){ $("#register_form").valid...

Jquery Uplaodify images multiple instance and call each instace completeion of previous one

Hi, I am using Jquery Uploadify for images upload with PHP, here i have multiple instances of uploadify and and each instance is uploading images in different folders. I want to second instance of uplaodify will start uploading images only after first instance of uploadify uploaded selected image. $('#listing_image').uploadifySetti...

How to prevent AutoPostBack when DropDownlist is selected using jQuery

I want to show a confirm dialog when the user selects an item in a DropDownList. If the user presses "Cancel", I want to stop the postback. Here is the function I add to the onchange event: function imitateConfirmUnload(event) { if (window.onbeforeunload = null) return true; return confirm("Are you sure you want to navi...

Help with JQuery tooltips

Hi all, I'm new to JQuery, I have a dynamic side menu (links have the class "channels") and when the mouse goes over any of the links in the side menu, I want a div that has an image and some text to appear next to each link, I've tried using many plugins but nothing worked until now. Here is the html for the side menu, I want each div ...

Proper way to include a jQuery library

I am working on a module for Drupal 7. I am using some of the jQuery UI modules which are included. my natural way to include these is to use drupal_add_js() and drupal_add_css() with the relevant files. However this feels a little wrong. Is there an official (or better) way to include these libraries, either from Drupal or jQuery. I ...

jQuery Array interpretation

I construct an array, which I am going to use later to compare some values. I use this code to construct "myArray", which I am going to use later: var optionTexts = []; $('#stripeMeSubSubCat tr').each(function(){ if ($(this).find('input:checkbox.subsubcat_chkclass:not(:checked)').length == 0) { subsubrow_cat_id_no = parseInt($(t...

Show jQModal window on page load using ajax

I saw this question: http://stackoverflow.com/questions/2884185/show-jqmodal-window-on-page-load and works fine when my content is not pulled from a remote source using ajax. How can I use ajax in jqmodal on page load ? ...

Jquery pagination problem

Hello i have this grid working fine here: http://tourscript.com/jqueryasp/default2.asp i start adding a pagination to this using the "nettut paginate anything tutorial" so it become like this: tourscript.com/jqueryasp/default.asp My problem is that when i click the pager to navigate in another page the Edit function fires up for some rea...

Need to customize jcarousel

Hi all, I'm using jcarousel to build a scrolling slideshow and need to make some customizations. There is a callback function that is referenced whenever an item becomes the last visible item in the carousel. 1. function mycarousel_itemLastInCallback(carousel, item, idx, state) { display('Item #' + idx + ' is now the last ite...

How can I rewrite URL in my case

Hi guys, I have read related Q&A's for this is question, but still I am confused on this, can somebody help me on this? What I am doing: my url is : www.mysite.com/home.php I have two files: home.php and get_data.php, in home.php i am calling get_data.php with the use of jquery. the code for jquery is: $(document).ready(function(){ ...

jQuery/Javascript "for" function performance improvement

I have a "for" function performed in a jQuery draggable function. Is there a better way to do this from the execution time perspective? My function is: $("#dragger").draggable({ containment: '#timeline', axis: 'x', drag: function(event, ui) { var divs = $("#timeline div.timeline"); ...

Triggering swipe and touch events on a mobile web app? - iPhone/Android

Hi folks, wondering here if there is a way I could trigger an event, so that any library listening for these events (e.g. jQTouch, Sencha touch, iUI, ... ). If I could extend or use jQuery for such task e.g. $(...).trigger('event') that would be great to know. Usage example: I need to debug a few web apps by simulating multi touch ...

jquery DataTable - change value of a cell not just display value

Hi i am fairly new to jquery DataTables.Hope someone can help What I want to do is change the value of the data before rendering the table, I used this below "fnRowCallback": function( nRow, aData, iDisplayIndex ) { if ( aData[2] == "0" ){ $('td:eq(1)', nRow).html( '6' );} But I found that although I chang...