how to toggle addClass and removeClass?
my code: <a href=# onclick="obj.addClass('fliph'); return false;">toggle</a> i want click toggle to obj.addClass('fliph'),then click again run obj.removeClass('fliph'). how to fix my code? thanks all! :) ...
my code: <a href=# onclick="obj.addClass('fliph'); return false;">toggle</a> i want click toggle to obj.addClass('fliph'),then click again run obj.removeClass('fliph'). how to fix my code? thanks all! :) ...
Hi, I'd like to create a very simple form which has one field where you can enter a 5 digit number - e.g. 12345. When you submit the form, I'd like the page to redirect to http://www.website.com/12345 I'm sure it must be fairly simple, but I've not been able to find the answer anywhere! Very grateful for any help. Thanks, Andrew ...
I'm not really sure how to describe what I want to do, but I'm sure I've seen it on many sites before. Basically, when someone clicks a link, it should show an element which contains some text and dims down the rest of the site so that the users focus is directed towards the element. It shouldn't let users click in the dimmed area eithe...
I need to implement a listener in JavaScript by anonymous subclass of an existing abstract base class, defined like this: public class Speaker { public static abstract class MyListener { private String name; public MyListener(final String name) { this.name = name; } public abstract boolean listen(final String words); } }...
Hi, I want to select a cell range in an HTML table and using Javascript to change the background color of the selected cells. Is there an event to get all ids of the selected cells? thx ... ...
How to get the rectangular co ordinates between two points in javascript as an object? for example foo(10, 20, 30, 40) shold return (10, 40) and (30, 20) ...
I was looking up newer functions of JavaScript and found ECMAScript/ECMA 5. Because I had never heard of it I looked in to it more and found that it comes in the form of different names such as: JavaScript, JScript (Microsofts Variation), ECMAScript, ECMA 5, E4X (JavaScript for Xml)and many others From what I have read it seems that ...
I would like to understand the low level details of how XMLHttpRequest works in Javascript, however I have not had any luck finding the implementation code within either the Rhino or V8 code. I'm not familiar with the code in either projects, so I may not be looking in the right spots. Is there an available open-source implementation a...
I have this markup (simplified): <ul class="targets"> <li><a href="javascript:void(0);" class="info">A</a></li> <li><a href="javascript:void(0);" class="info">B</a></li> <li><a href="javascript:void(0);" class="info">C</a></li> </ul> And this script (simplified): $('.targets').click(function(e) { alert(e.target); // a...
when i use jquery to create an element(a div, for example) in a callback function, it doesn't allow me to manipulate the newly created element outside the callback function, how can I get around this? here is the example: $.get('menu.xml',function(data){ //create a new element with an ID called "#newElement" }) //I can't select the ...
Hi, I had to develop a newsletter manager with JS + PHP + MYSQL and I would like to know a few things on browser timing out the JS functions. If I'm running a recursive function that delays a call to itself (while PHP returns a list of email), how can I be sure that the browser wont timeout this JS function ? I'm asking this, because ...
Hey all, I have an issue regarding sending form values to a script. I have a form set up, and upon the user pressing a button I want the values in the form to display on another part of the page. I can easily do this with php or another web scripting language, but all I know is how to do this by sending it to the script in a form of h...
Hi Actually i am working on IPTV what i want is if i pause any video i must be able to capture the moment at which it is which may be in main TV page and now if click another button it must open a small iframe which contain the same video but resumes from the same instance where it is turned to small iframe. Please suggest some solutio...
Is there a way to identify the list of registered listeners for a given event in javascript, if so can you please list out the sample? ...
How do you call a controller method from an onchange event? I'm using Spring MVC. I have a <form:list> and I wish to update the current page when an onchange event is triggered in the list. ...
I have a large web application where the user will setup many browser tabs and browser window layouts. For example, having 2 windows open vertically next to each other. I need a way to save it and then load it later. So from analysis i need to: 1. Detect what bwoers tabs are using a certain URL. 2. Detect their position. 3. then save i...
Hello, how can i transfer the Value from Input 1 in 2 and add some letters? <script type="text/javascript"> function doit(){ document.getElementById('input2').value=document.getElementById('input1').value; } </script> Input1: 2342 Input2: pcid2342d Can some one help me? ...
Hello, I have an ajax call that looks like this, $('campaignType').addEvent('change', function(){ alert($('campaignType').value); var request = new Request({ method: 'get', url: '/admin/admin_' + $('campaignType').value + '.php', onRequest:function() { alert('Request has been made, please be patient') }, on...
Hi all, I have a div container in the page.tpl file, which I want to use as a popup layer for images. These images are recieved from the nodes. So every time i hover over the images i want to show the popup layer with content from the specific node. How can I send content to that specific popup div from the node.tpl? //Kris ...
Lets say I have an unordered nested list: <ul> <li>Item a1</li> <li>Item a2</li> <li>Item a3</li> <ul> <li>Item b1</li> <li>Item b2</li> <li>Item b3</li> <ul> <li>Item c1</li> <li>Item c2</li> <li>Item c3</li> ...