jquery

JQuery can't change focus on keydown

I'm trying to change the focus whenever a user presses tab on the last field. I want to set the focus on to another input field. I have the following javascript code: $("#input2").keydown( function() { if(event.which == 9) { $("#input1").focus(); } } ); And this is my trial html code: <div id="inputArea1"> ...

Json decoding in PHP

I am trying to decode JSON in php I sended using an ajax call in javascript (jquery). The javascript code: var editSchedule_data = { 'action' : 'editSchedule', 'eventid' : $('#eventid').val(), 'pixels_per_minute' :$('#pixels_per_minute').val(), artists: { artist: [] ...

animation are not shown on jsp

In my Struts based application on eclipse, graphics animation on jsp page are shown in preview mode (both mozilla mode and IE) like I can click to button some text animation are display(like toggle effect) but on design mode button are not give any response. i am using jquery,css and js. ...

Why do people call the jQuery $ alias a 'factory'?

On various sites, jQuery's $ variable is referred to as an alias, and on others, it is referred to as a factory. I took a look at the source code, and I think the former is correct. As far as I can see, the dollar symbol is being defined here: // Expose jQuery to the global object return (window.jQuery = window.$ = jQuery); This is ...

Show/hide child elements within a nested list block

I'm modifying a tree view of some relationships we have, I've managed (with help) to get the checkbox ticking the children of itself but what I'm attempting to do now is by clicking the plus next to each parent display the relevant child levels. Likewise, if the minus is clicked, it should hide the child elements. The list can contain a...

CKEditor RTL issue

I've added language:'ar', contentsLangDirection:'rtl', contentsLanguage:'ar' options to my CKEditor instance being initialized using the JQuery adapter. But the text is still left aligned. It declares the <html> tag with dir='rtl' and lang='ar', but on each <p> tag, it has an inline text-align: left style. How do I get rid of that styl...

setInterval /clearInterval dropdown issues

Hi, I want to make a dropdown menu using jquery, but it closes even it shouldn't. I have an element which is subscribed to the mouseenter event, mouse enters the element, the dropdown, fires up, everything seems to be ok. I go down to the item list which is list element with some content in it. The first time i change the two elements e...

Why does jQuery not affect content generated after a Ajax call

I'm attempting to hide all li's within a div which is dynamically generated when a use clicks a button. The content of the div is pulled through an Ajax call and I then assign to a div on the page. For some reason though, any attempt to alter the style with jQuery doesn't have any affect. I notice I also have to apply $(selector).live(...

How to get Form Values in JQTouch:

HIi friends, i working on a IPhone Web App as its kinda new to me, have studied some basics of JQuery, i want to get the form value in one view and to return to next view,i have tried this one, $("button:#Get").click(function () { $('#msg').html($('input:textbox').val()); }); it works with JQuery but not in JQTouch. Any Ideas Peo...

How to unhide multiple inputs using jquery.

Hi, I have form where user can choose to enter more than one option. I currently show one input field and hide the remaining 4 input fields for that option. Previously, I used link under each input to unhide the next input and link. $(function(){ $(".show").click(function () { $(this).parent().next("div").show(); ...

Is there any handler on the change of window url location in javascript or jquery ?

There is a form in my html code. I need to confirm if the user wants to save the current form when they are about to redirect accidentally (by clicking on links, or clicking on the back button of the browser, etc) I know GMail has a solution for this. It confirms whether I want to save my new mail as draft when I was leaving the page. ...

reading json from jquery

Hi everyone I am trying to read some json and do 2 things. Insert some of the json data into a UL. Second thing is create a function that can be called from a anchor tag and displays the other data.Let me try explain with my code. My json looks like this [{lakeName:"Lake 1",lakeCode:"111",Readings[["24-Oct-10",12.5],["24-Oct-10",10.5],...

Jquery doesn't work in ie

Ive made this jquery script quite basic really, but yet it fails to work in ie, but works in every other browser have tried it in chrome, opera, safari and firefox. I've uploaded the script so you can take a look ops wrong url http://ddart.isgreat.org/test2/ this is the right one the code is following $(function () { $('#uploadf...

I have a nav in an unordered list. On hover these images are supposed to switch out...

The whole page is a PHP include inside of a main index file. Should I be placing the javascript on the main page? or an external javascript file? Am I referencing the li wrong? <ul> <li class="about"><a href="index.php?about"><h1>about</h1></a></li> <li class="team"><a href="index.php?team"><h1>team</h1></a></li> <li class="training">...

get previous selected dropdown item

i have the following code where i have a dropdown list (with class="addToList" and followed by a button (Class="addtoButton"): When i click on the button, i want to grab the current selected value and text from the previous dropdown list. $(".addToPortalButton").live('click', function (e) { // grab the previous dropdown list value and...

Jquery remove table row not working

Basically is to click button to generate table row, then click minus button to remove row. I have tried it with a few ways below, non of it work. -.bind -.live -normal way It seems like it is not working due to the table is generated dynamically. <script language="JavaScript" src="jquery-1.4.3.min.js" type="text/javascript"></script> ...

jQuery delay start function

I'm using the jQuery Cycle plugin to cycle through some words, but I don't want it to start or show any of the words until a few seconds after page load, perhaps 10 seconds or so. This is the code I have: $(document).ready(function() { $('#questions').cycle({ delay: 10000, speed: 2000 }); }); What would be the best way ...

Add "more" html at then end of an element using jQuery?

I have an empty div at the beginning: <div id="mydiv"></div> I know how to add for the first time html into my empty div using jQuery: $('#mydiv').html('my html!'); But my problem is that I don't know how to push more html at the end of my non-empty div: <div id="mydiv">my html!**how to add more html here**</div> ...

accordion if/else logic

Hi. I'm guessing my if/else logic is skewed. Basically I have an accordion structure where, on page load, the first accordion pane is half-revealed to a height of 150px. Then when the user clicks on the accordion header it fully opens to a height of 320px. On the next click it should close and act normally like the other accordion elemen...

Problem with removing child

I have two drop down forms. When the first is "changed" the second is populated with some data via ajax. It's work but the value of the second drop down is not cleared on every request (I'm using $('#second_drop_down').children().remove();) Here is sample code $('#first_drop_down').live('change', function() { var x = "some ajax dat...