jquery

Django admin template with dynamic forms using jquery

I'm developing a questionnaire app. The question model has a "type" field, lets say A and B. The "question" model is set as foreign key to two other models, ModelA and ModelB. Its easy enough to add ModelA(or ModelB) as inlines for questionadmin. But I want to dynamically change the inline fields which are shown on admin page, depending ...

PHP two dimensional array to Javascript array

I had php multi dimensional array Array ( [0] => Array ( [WorkHrs] => 9826 [Focus_Date] => 2010-02-10 ) [1] => Array ( [WorkHrs] => 9680 [Focus_Date] => 2010-02-11 ) ) and I want to convert it in Javascript to myArray = [['2010-...

mega-menu using jQuery

hi, I'm trying to create a "mega menu" using nested <ul> within a <li>. Using jQuery (mouseover) on the parent <li>, I can make <ul class="sec1" and <ul class="sec2"> appear. But the mouseout on li doesn't work because the drop down disappears as soon as you rollout of the parent <li>. How can I keep the drop down active if the mouse i...

Facebook:Is it possible to post on wall using multi-friend-selector? Or can I use JQUERY with php-sdk(fbml, not iframe)

I am new to facebook development. I am using PHP-FBML with Graph API. Edited: Or can I use JQUERY with php-sdk(fbml, not iframe). If yes then how? Please someone help me out. ...

how can I use galleriffic with two different images list?

I want to have two different thumbs lists with pagsniation for each one but I want them to display the big image in the same container. how can I do that? ...

jqGrid Events problem

Hi, i have scenario where i have to do the batch update like in save change i have send the update to the database from jgrid. now, i am using the the array to store the updated data. and on onafterupdate event i have to add the element to the array. onafterupdate event is not working. please, help me. How to use onafterupdate event....

jQuery-UI's Sortable function moves div unnecessarily

Hi there, I have been working with jquery-ui's sortable demo for a while. On looking closely, I found that it nudges the divs slightly. Here's an online demo : http://jsbin.com/ijusu3 Try moving the the center one to the left, then you can see the right ones nudging about 2 pixels to the left. I would like to know why. This has bee...

reading external server file in jquery and php

hey guys i need to load an external html page in my codes $(document).ready(function(){$("#check").load("http://www.mysite.com/names.html")}); and i need my script reads this external html page is it possible to do such a thing in jquery or even in php ?! i need to know all of the possible ways . ...

Image Preloader Problem

i came up with this code and found out that in the first load of image, the transition works fine but at the second time, the transition will not appear. var imgIndex = 0; SlideImages(); function SlideImages() { $("<img />").attr("src",theImages[imgIndex]).attr("style","display:none;").load(function(){ ...

php ajax auto logout with timer

<script type="text/javascript"> var t; function startTimer(){ t=setTimeout("document.location='../login/logout.php'", 50000); } function stopTimer(){ clearTimeout(t); } </script> This is my script for auto logout, i want to show the countdown timer, How to create and show the timer, Also i want to make alive when the user hit the...

Disable/enable element with checkbox and jQuery?

Hi, I have a checkbox and if I tick it I want a textfield to become enabled (disabled as default) and when I untick the the checkbox I want it to become disabled again. I saw here http://stackoverflow.com/questions/1160238/jquery-checkboxes how I caan toggle a CSS class and here http://docs.jquery.com/Frequently_Asked_Questions#How_do_...

How to handle when javascript is turned off

Hi, My first web application relies heavily on Javascript and AJAX application. Other than my Login Page, majority of the pages relies on Javascript and Ajax when submitting data to the server. I have been thinking about this, if user disables his/her javascript then my app does not behave accordingly. I used this code in my Login pag...

Display Jquery UI Dialog on current mouse position, bug in IE 8

I am using Jquery UI Dialog and its working fine in FF/Chrome/Opera but there's some issue with IE, I am having latest version of JQuery UI 1.8.5 and all the workarounds setting position:absolute etc are not working at all, What I need is if my anchor tag is near to end of the browser window and there's not enough space for the ui dial...

Show loading GIF in jQuery without AJAX?

I know how to do this with $(gif).show(); $.post( action, data, function(result) { $(gif).hide(); } ); // using ajaxStart and ajaxStop is a better way too But, I don't know how to do it without using post, I tryed $(gif).show(); doAction(); // No post... $(gif).hide(); The problem is, while doAction function is running the $(...

why delay() function not delaying the .load() function?

$("#hastable").delay(2000).load("tbl_clients.php?page="); It is not working for me. But otherwise all effect delay successfully for this .delay() function like .hide(),.show() ...

How to add a class

<div class="post-content"> <p>XYZ</p> <h4></h4> <p>XYZ</p> <h4></h4> <p>XYZ</p> <h4></h4> <p>XYZ</p> <h4></h4> <p>XYZ</p> <h4></h4> </div> Now i want to add a class on the p which is just coming after p, want to hide it. Then after on h4 click want to show it. ...

jQuery show a number of list items, fade them out then show some more

Hi, I've got an ordered list of thumbnail images. I'm trying to figure out how to display say - 9 of these, then have them fade out and display the following 9, etc etc. using jQuery. There will be a lot of images, so I'll need the function to keep on truckin... I'd be very grateful for any help ...

Jquery - Read all Classes from a div

Hi, i try to read all classes. HTML <div id="test" class="fff aaa ccc" >hello world</div> JS if ($('#test').attr('class') != '') { // Read classes var all_classes = $('#test').attr('class'); // Output $('body').append('Classnames: '+all_classes+' '); } Example http://www.jsfiddle.net/AQgqU/8/ Can somebody help me...

Parse html/text document as XML?

Hello! How can i parse a document with a text/html header as a xml document with jQuery? Thanks in advance ...

class attribute with css in jquery

I need jquery function do this: First: <a class="MyClass1 Myclass2 {padding-top:10px;height:20px;}"></a> After calling function: <a class="MyClass1 Myclass2" style="padding-top:10px;height:20px;"><a/> Function must work with all elements Edit For example: i'm using on the asp.net mvc. Every Module contains different theme prope...