![]() |
how do I tell javascript what type of data I'm passing to a function?
I have a function that goes like
Code:
function collapse(div) {Code:
<a onclick="collapse('pictures')">pictures</a> |
javascript is typeless, so a variable holds whatever data of whatever type you stick into it
Change Code:
document.getElementById(div)Code:
document.getElementById($div) |
| All times are GMT +2. The time now is 20:03. |
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2013, vBulletin Solutions, Inc.