jquery

ajax - check images have loaded before writing to the page

I have a bit of a problem that I have just found, after I thought this project had finished. It worked perfectly on my local server but when I pushed the code live the images can take half a second to load properly causing a little page thumbnail to pop up over a loading image. grrr So whats happening? Well first off a function runs o...

How to send javascript key-value pair to server?

I have a key value pair which i want to send to server. e.g: var obj = {'item1': true, 'item2': false, ........}; I want to send this information to server by ajax call. But at server side i am unable to get individual value. At server side i am getting "object" as string. I am using jQuery for making an ajax call. Can anyone please g...

jQuery z-index doesn't work

Hi, i have a menu and on hover i fade a box in. Behind this box i have a small icon and i want to move it in front of the box so you can see it on hover. Here is my menu > Navigation I tried it with that jQuery(this).find(".flyer").css("z-index", 10000); but it stays behind. How could i manage that problem? greets Max ...

Problem creating jQuery plugin with textareas

I'm trying to modify this script that emulates the Word 2007 minibar in a textarea. I have wrapped it in a plugin, the problem is that it will not work with multiple textareas. You can try it out at JSBin (Just select som text in the first textarea and then click on the "b") Can someone help me? I'm kinda lost. Update Should have m...

Creating an element with properties, using an object-literal

Since version 1.4 of jQuery; you have been able to create an element using an object literal, defining the elements properties... $("<div />", { id: "test", name: "test", class: "test-class" }); On top of assigning a few properties to an element; I'd like to add some in-line styles. Is this possible, using the object liter...

JQuery UI Datapicker : How to add next/previous year buttons

I use the feature of selecting a year with a dropdown. I use it to set birthdays of people at least 18 years old. So far it works perfectly. I have set it up using theseg parameters: $('#datepicker').datepicker({ changeMonth: true, changeYear: true, dateFormat: 'dd-mm-yy', ...

Retrieve information from URL using Jquery

Suppose I have an url like : http://localhost:1122/MyProject/MyPage.aspx?from=home&amp;id=454. I can retrieve the 'form' value in code behind like Request["from"].How can I do the same using Javascript?Can I do this using Jquery also?If yes how can I do this? ...

jQuery .append ( function(index, html){... } ) question

Let's say we have this unidentified DIV <div class="class-occurs-many-times-on-page">foo</div> and we want to place right after it another unidentified DIV that contains dozens or hundreds of SPAN elements: <div class="a-class-that-occurs-many-times-on-page">foo</div> <div class="another-class-that-occurs-many-times-on-page"> ...

Use the same jquery object in a call

Not sure quite how to describe this but this is what i want to achieve: $('.class').append($(this).attr("unit")); but this doesn't append anything, i don't believe that $(this) is the element. Im not sure how to do this, but if there is a better way like attaching code to an event on a div, but i can't think of any triggers that work...

jQuery dialog with dynamic content

I want to create a jQuery dialog on-the-fly. I'm using this: var newDiv = $(document.createElement('div')); $(newDiv).html('hello there'); $(newDiv).dialog(); I then have this in the html header: <script type="text/javascript" src="js/jquery-1.4.2.min.js"></script> <script type="text/javascript" src="js/jquery-ui-1.8.1.custom.min.j...

change list selection to be a toggle selection

Hi All, I have an ASP.Net (3.5) Web application and I would like my users to be able to select the items from a simple HTML list using a toggle selection rather than the usual multiple selection (with CTRL and SHIFT). I guess the best way should be to achieve this on the client side using some jQuery or simple javascript. Does anyone ...

jquery / jqtouch getJSON call causing infinite loop?

Writing my first JQTouch app. When I go from #login to #home, a JSON ajax call happens successfully but the pageAnimationEnded event appears to be in an infinite loop. $(function(){ $('#login').ajaxComplete(function (e, xhr, settings) { jQT.goTo('#home', 'flip'); }); ...

How to collect jquery.ajax() data in PHP ?

I send data from javascript to PHP like this: $.ajax({'url': 'my.php', 'type': 'POST', 'data': JSON.stringify(update_data), 'success': function(response) { alert(response); } }); Using HTTPFOX Firefox plug-in I see the following data in the POST DATA tab: {"file...

How do I make this mouseover effect? with hopefully jquery....

For a perfumer's website I'm displaying a row of nine bottles on a shelf. It appears as one continuous photograph. I've cut it into nine seamless slices, each in its own table cell with its own id. I'm thinking to use jQuery as I want the following on rollover: * Bottle blitzes instantaneously bright also triggers short sound file. * A...

jquery validate conditional max

I have a form where there's an option group with the choice of entering a value in pounds or a percentage. Following this I have an input box for the actual value or the percentage. I want to use the validate functions in jquery to set a conditional maximum value (e.g.100) if the user chooses the percent option. Is this possible - I t...

Controlling hover speed in jquery

I have written jquery code to show description if I hover on a hyperlink. But I donot know how to control the speed of the hover, so that i can show the description slowly.Can anyone please suggest me how to do this. Thanks ...

Trying to get the s3slider to work on my shopify

Ive been working on this for 2 days now and its alittle out of my league, I was hoping a cyber samaritan could help me out. So shopify has assets that you upload then call upon them in your html and liquid coding. As far as I understand the html section goes in the theme.liquid part and to display the slider on the front page the jQuer...

how to insert flash into form like http://www.mediafire.com

I would like to isert flash upload into my index file but I dont knoz how to insert flash. this is the link of the flash http://www.tinywebgallery.com/en/tfu/web_demo1.php i would like to insert like http://www.mediafire.com when you click to UPLOAED to MEDIAFIRE . thank you for your help. ...

Is there any way of forcing a set of jquery ajax calls into a queue?

I have an array of data (arrData) which I loop around (10 elements), calling an ajax request on each. As it stands at the moment each ajax call is made in parallel. This means the server receives 10 calls all at once and sends back the data in whatever order it calculates each in. To relieve the server slightly I want to now queue my cal...

CKEditor, JQuery: Animation breaks the editor

I initialize a CKEditor in a <div style="display:none" id="container"></div> element. $('#container').show(); shows the editor and everything works. However, if i combine the call with an animation like $('#container').show('blind');, the editor comes to the foreground (btw: the animation looks sweet), but however, the editor gets brok...