jquery

How my select list become uneditable?

Hi everybody, I am coding some sort of booking system - calendar. One of the features is also a (js) pop up window with detailed information about event - user can either view them or edit. Now my problem - I have put there a HTML select control (dropdown box), quite simple - 5 options. But somehow, and I have no ide why, this select i...

Firefox and Safari stylesheet loading time, firing JavaScript event when loaded

We have some JavaScript code that resizes <div/> elements (adjusts height/width/padding/margin etc.) based on the dimensions of a parent <div/> element, specifically the height and width of the parent we use in the calculation. The parent div height and width is defined in a external CSS file, and <link> is used to include the stylesheet...

how to Custom build a javascript API based on Jquery and some questions about the syntax used in Jquery.

Hi all, I come here with quite a bunch of questions so lets start: I want to know some things about the syntax used to make jquery as I wish to learn from it an use it for my self. Question 1: The starting of the jQuery library (function( window, undefined ) { // Define a local copy of jQuery var jQuery = function( selector, conte...

PrettyPhoto jQuery: Wont show image on click

<a href="images/profileimages/noPhoto.jpg" rel="prettyPhoto[photo]" title="<?php echo $showU["full_name"]."´s profilbild"; ?>"> <img src="images/profileimages/noPhoto.jpg" width="122" height="160"></a> I use jquery prettyphoto, when i click on the resized image it just says in a alert "image cannot be loaded, please make sure its th...

Unable to access cookie in HttpRequest

I'm trying to do a “get” of a page, and pass in a list of ids that is stored in my cookie. My assumption was that it would be possible to get the cookie with the list from my request. However, I don’t get the cookie on the server side as I would expect. I only get a “user” cookie, but that doesn’t contain my info. I want to try to avoi...

jquery: remove previous class by clicking

Hi All, I've a very simple question but can't figure it out by myself. i've the following problem. i've several list items like below. <li></li> <li> <img src="images/persoon1.jpg" alt="persoon1"> <div id="infoPersoon"> <h3>Jaap-Jan van der Gouw</h3> ...

Binding jQuery handlers during the event capture phase (not event bubbling)

I'm looking to implement event delegation on blur/focus events, in a similar way to that suggested on quirksmode. As explained in TFA, blur and focus events don't bubble, so you can't use event delegation with them in the bubbling phase, but you can grab them in the capture phase (man, javascript events are weird). Anyhow, as far as I ...

jQuery strange behaviour on click() from a click()

Hi, I am facing a strange behaviour in jQuery 1.4 with the click event. The idea is to click on a drop-down list (change()), which then invert twice a collection of checkboxes by using the click() function of them. If I have to do so it is because the click on checkboxes update other fields, so I thought instead of inverting the checkbox...

Unbind mouseup?

I am trying to unbind the mouseup event from an element. I have tried the following but none are working. $('#myElm').unbind('mouseup'); $('#myElm').unbind('onmouseup'); $('#myElm').unbind('click'); How do you unbind an event assigned using $('#myElm').mouseup(function({...}); ??? Edit: Adding full code cacheBgArea.mouseup(functio...

Why not vanilla Jquery for mobile? i.e. in contrasts to mobile-specific jquery-based libraries (jqtouch/sencha)?

Hi all, This may seem like a basic/stupid/obviously-answered question, but I wanted to check: why use a mobile-oriented javascript library (e.g. jqtouch) instead of straight jquery? The context: We're looking at enriching the mobile-view of our web-app. I tried the various jqtouch demos on my android 2.1 (Motorola droid). Many of the...

how to style incrementally with javascript?

Hi all, So i am using jQuery and i have a rather large table for what i want to do (> 100 rows). For every row, i'd like to do quite a bit of work on it, my question is if i have $('#tableid>tr').each(function(i){some code here}); How do i stop processing when i hit multiples of 5 and just put the effects out on the browser first so...

[jquery] submit form with textarea and multiple file?

if i have one form that include some input, textarea, select, and multiple file. such as <form> <input type="text" id="name" /> <textare id="address"></textarea> file 1 : <input type="file" id="file[]" name="file[]" /> file 2 : <input type="file" id="file[]" name="file[]" /> file 3 : <input type="file" id="file[]" name="file[]" /> </for...

Why is Jquery sending "undefined=undefined" as my post parameters instead of sending the array data?

I am attempting to send a javascript array to my web server for an ajax request. Here is my code: function SearchTasksByTags() { // Get the list of tags currently chosen var tags = []; $('.tagit-choice input').each(function () { tags.push($(this).val()); }); // If we have no tags, don't bother searc...

How to create a jQuery element cache mechanism?

I think I wrote a simple DOM cache mechanism to be more efficient, avoiding multiple $('blah') calls, e.g.: if ($('foo').length) { $('foo').bar(); } So I created a DomCache child object under my project main object: MyLib.DomCache = {}; When I need a jQuery object of an element, I look in the DomCache and if I found it I use it...

browser event for window.focus()

Hi all, Is there a way that when i click on my browser, and give it focus, to run a method once? And then when the browser loses focus and then get focus back to again run that method only once, again. Thanks, rod. ...

Get results from php script via jquery load() functon before php script finishes

I have the following situation: jquery: $(function(){ $('input[type="button"]').click(function(){ $('#result').load('script.php'); }); }); script.php: <?php echo "1"; sleep(2); echo "2"; sleep(2); echo "3"; ?> Currently the jquery load function will wait for the php script to finish and the...

Jquery, CSS: How do I resize a set of fixed elements to dynamically fill the remaining height of the browser window?

Basically, I have a set of fixed elements that start 180px from the top of the page. They're all stacked, and I use another set of functions to hide/unhide them accordingly to emulate tabs. They all belong to the same class 'editor_view'. I want each of them to terminate at the bottom of the page. What would the code for this look li...

When certain ASP.NET controls are in a jQuery Dialog their values are not in postback.

I have a series of jQuery dialogs that contain ASP.NET form fields. I have a hidden ASP.NET button that is triggered when the user clicks a button in one of the jQuery dialogs. I can enter some data (listboxes and textboxes) and click the button that triggers the hidden button's event (an onClick) and the page will post back. But, when ...

set a:visited style with javascript or jquery

How I can set a style of a:visited with javascript or jquery. I know how to set with a regular link like document.getElementById('a12').style.color = '#ff0000'; But I don't know how it work with a:visited? ...

Jquery - Load div with random margins / position

Hello. I'm looking to use jQuery to load Divs with random margins effecting the css. Below is the script I'm attempting use, trying to create a number random from 1-500, and loading that as the margin. But I'm not a jQuery wiz, and I'm missing something. Thanks so much for the help! <script type="text/javascript"> $(function(){ $("#r...