0

Hello Everyone
i am new in java language. and iwant to hide any <div> tag on my site
site example: 'www.mysite.com'
and i have a div in my website. like <div id='header'>

when we load my site the java script run and check my site url.
'www.mysite.com' if the url is correct then my <div id='header'> show in my site
else if the url is not match with the java variable var'www.mysite.com'
then hide

Please help

2
Contributors
2
Replies
11
Views
3 Years
Discussion Span
Last Post by razamughal67
1

razamughal67:
you seem to be mistaken. what you are asking, is JavaScript, not Java. even though the names seem alike, they are not even remotely related. One is a scripting language, the other is a platform independent programming language.

anyway, it is fairly easy to manipulate the css scheme for an element (or tag).
just add a class to your div (or, using an id, it should be possible just as well), and if the urls don't match, set the visibility value to false.

remember: you don't really "remove" the tag, as much as you hide it.

for future reference though, JavaScript questions should better be asked in the Javascript forum

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.