manojdubey Posted August 17, 2006 Share Posted August 17, 2006 Hi All,Can anybody tell me the use of $ in javascript programming.Below is the code snippet.function hideLayer(layerName) { rolloverContainer.style.visibility = "hidden"; rolloverContainer.style.display = "none"; var divObj = $(layerName); divObj.style.visibility = "hidden";//----Error is coming at this point divObj.style.display = "none"; }Its showing errors as 1.divObj has no properties or 2. object expected.Any Ideas???ThanksManoj DubeyNoida, India Link to comment Share on other sites More sharing options...
Jack McKalling Posted August 17, 2006 Share Posted August 17, 2006 I think that $ just doesn't work :)If this is true, then the object divObj will not be created, so the next line would cause the error, which it does Link to comment Share on other sites More sharing options...
skym Posted August 17, 2006 Share Posted August 17, 2006 There is actually no $ operator in javascript. It could be used only in regular expressions. Link to comment Share on other sites More sharing options...
Jack McKalling Posted August 17, 2006 Share Posted August 17, 2006 So did I think, but I wasn't sure it exists at all. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now