Skateside's Profile
Reputation: 44
Excellent
- Group:
- Members
- Active Posts:
- 464 (0.36 per day)
- Joined:
- 09-November 08
- Profile Views:
- 10,556
- Last Active:
Today, 01:31 PM- Currently:
- Viewing Forum: CSS, XHTML/HTML & JavaScript
My Information
- Member Title:
- Advanced Member
- Age:
- 27 years old
- Birthday:
- August 20, 1984
- Gender:
-
Not Telling
- Location:
- Bedford
Contact Information
- E-mail:
- Private
- Website URL:
-
http://www.sk80.co.uk
Users Experience
- Experience:
- Advanced
- Area of Expertise:
- Coder
Posts I've Made
-
In Topic: Conflicting Java scripts Please help
Today, 08:47 AM
Try bringing in jQuery before bringing in anything else -
In Topic: My Website
Yesterday, 07:23 PM
The code is verbose, outdated and unindented. Tables should not be used for structure, breaks should not be used at all. -
In Topic: WDF martial artists
24 May 2012 - 07:25 AM
I went to a kickboxing class for about 2 month when I was 21ish. I also studied ninjitsu for 6-8 months when I was about 26. I need to pick that back up thinking about it, that was fun -
In Topic: Javascript encapsulation
22 May 2012 - 08:59 PM
Lana9, on 22 May 2012 - 08:22 PM, said:Now, I have only this two errors: Problem at line 26 character 34: Use '!==' to compare with 'null'.
if(window.innerWidth != null){
Implied global: window 26,31,32.
Thank you, a lot for your advices!!! This was really helpfull.
The problem with != is that is can lie, when checking against things like null it will say it's the same as false or undefined. That's why the adive is to never compare with !=, but instead use !==
if (window.innerWidth !== null) {
As for the implied globals, it's tough to see what it could be refering to. Try moving your functions so they're declared before they're called, that might help. -
In Topic: Javascript encapsulation
22 May 2012 - 08:07 PM
Lana9, on 22 May 2012 - 01:38 PM, said:Hello Skateside,
thank you for your response. I took your advice and done everything what you said, but I have a bunch of errors, still.
Typeof: "Problem at line 14 character 20: Missing radix parameter.
return parseInt(this.element.offsetLeft);".
Also, I ran my code at PhpED, errors are the same. Of course, can't run code on button click, although /onclick event/ should call function for starting animation.
This is how my animation should work(project with no encapsulation):
My first project
The parseInt function is designed to interpret any number (or string that looks like a number) into a real integer. Usually it can successfully guess whether that's supposed to be base 10, 8 or 16, but occassionally it gets it wrong. To stop that, you can use the radix parameter to tell it how it should interpret the number. I'm guessing you want your number to be base 10, so here's how you say so:
animWidth = parseInt(hello.offsetWidth, 10);
What other errors are you getting?
Help




Find My Content
Display name history