jquery

JQtouch page reloads even if data has been loaded

Hi, Just playing around with jqtouch. I have a ajax callback that gets regions froma DB. while waiting I want it to display a 'loading' message which has been knocked up in css. Works perfectly except it keeps appeneding to the end of the page when i try and remove the class from the loading message. $('#Regions').bind('pageAnimationE...

jQuery JSON prepend / append unclosed tag rather than full tag only once for set of elements

jQuery - is it possible to dynamically wrap a bunch of generated <li> elements (fetched via JSON) appended to a div id with <ol>, for example? I know of the wrap() function, but that seems to do it for each element of the li. Applying the prepend("<ol>") automatically closes the tag before the each / append() loop goes through ...

Jquery ajax responsed content does not write into the html form

HTML code : I echo this content in php file, In result i get only the 'Contact Us' Remaining part does not display the html form <div > Contact Us <form name="profile" action="" method="post"> Name : <input type="text" name="fullname" id="fullname" /> Email : <input type="text" name="email" id="email" /> Mobile : <input...

Can jquery return height of an element as a percentage?

$('#my_div').height('50%') will set the height but how can you retrieve the divs current height as a percentage? ...

Jquery: Could someone explain this small snippet of code or give me a link to a good tutorial?

What is the "index" part called, in function(index)? an event handler? or? what? and could someone explain to me why i need the "index" in "function(index)", i don't understand why it wouldn't work if I deleted the "index" part from "function(index)" $("h2").each( function(index) { $(this).css( "z-index", index*2+2 ); }...

Image Preloader via JSON, JQUERY, PHP

Hi there, im attempting to make a auto preloader via php an JSON my reason being no other preloaders suit my purposes at this time. Im developing off a WAMP installation with php version 5.3.0 an apache version 2.2.11 an using the following php code: $rootDir = dirname(__FILE__).'/..'; $imgdir = opendir($rootDir.'/images/'); $i=0; whi...

how to send an ajax request on clearing text box using jquery typewatch?

Hi I use jQuery typewatch plugin to send an ajax request when the user stops typing in the text box. If the user enters something the result will be filtered based on that. if the user clears out the text box, i want to load the whole result how do i do that? I tried setting the captureLength to 0, even tried to set the minTextLength on...

AdBlock is killing my XMLHttpRequests ... work-around?

A quick Google search shows that this is a common problem: AdBlock Plus for Firefox kills XMLHttpRequests. Throws an exception: "Component returned failure code: 0x805e000a." However, the only prescription I could find is to send random parameters in my ajax call but that didn't work. I've renamed file extensions, tried just about ...

J query scroller asp.net

Hi Everybody, I have to make a jquery scroller as given in http://www.isango.com/. Look at the bottom of the site. Please Help me making this. Any help will be appreciated. Thanks ...

JQuery draggable - No overlap

Hi, is it possible to say "draggable div's -> no overlap" ? I think the mainproblem is the position:absolute; ... right? kind reagards Peter ...

jquery 1.4.2 in ie7 adding name attribute as submitName

var input = $("<input />").attr('id', elementId).attr('name', elementName); I am creating input as above and then adding it to parent. All browsers working ok but in ie7 there is no name attribute for above input it creates submitName attribute instead. And jquery validator do not like when there is no name. Why is it changing name...

How to reduce my repeated jQuery code

Hi - first post here at this great website! I would like to reduce the amount of code for the following, espacially as there are more parts I need to add in the future - I'm sure there must be an easy way but I'm just not seeing it. Thanks for your help! $(document).ready(function(){ $(function(){ $('#iqdrive').click(...

Math with jQuery /Javascript

Hello, I have dynamic input boxes with values of dates like this <input size="30" id="date_one" value="21/03/2011" type="text"> <input size="30" id="date_two" value="14/08/2010" type="text"> I want to calculate difference between these two dates. i.e. How many days remaining ? Is it possible with jQuery to do this kind of math...

Actual IE6 Png fix

What png fix method is the most actual today? Lite-weight, with background-repeat and background-position support. ...

jQuery $.get (async) big file blocks browser

I am doing a jQuery $.get to a html file, and in the success function I filter on a select block and take the options apart, rendering the text of the selects as paragraphs in divs that I append in my markup. Getting and rendering the selects takes a while (there are about 8000) but I was expecting the div's to show up one by one and let...

Help me choose between Javascript, jQuery, or AJAX.

Hi there, before i start of with anything i know that jQuery and Ajax are the JS frameworks and it is nothing but JavaScript itself. I started to learn Javascript few days ago, and then i realized the need to learn the AJAX and then suddenly i felt jQuery will be the better solution, heck i am confused here, i cannot go three at a time n...

window.location.hash not working in Chrome/Safari

Hi all, I have the following code on my website, which basically checks to see if there is a hash in the URL, and if there is then it triggers a click on a tab. This works fine apart from in Chrome/Safari - any ideas how I can fix this? jQuery(document).ready(function() { if(window.location.hash){ $("a#viewapart").trigger(...

Javascript works in Chrome, Safari and Opera but not Firefox

Site here. Basically the box in the middle doesn't generate random string from my database in Firefox as it does in the other browsers. I can't seem to find the problem, my JS skills aren't amazing. I haven't tested it in IE as I don't have access to it right now. Any ideas? Thank you! ...

Keyboard navigation using jQuery

Hello! I'm trying to add some keyboard support for a website I'm working on and I found these plugins for jQuery: shortKeys and jquery.hotkeys (can't post link because i'm a new user). The thing is I want to make it so that when a user presses "j", for example, to go to a different page, "about.html", for example, but, I don't know how t...

Embed html into an existing div

When the html is returned from django views <script> //The following is in the ready function $("#data").html("{{dict.html}}"); </script> <div id="data" name="data" style="display:block;"></div> The following html is displayed on the screen.How to embed this html into data div <ul ><li ><a ><ins> </ins>Ses</a><ul...