Click here to Skip to main content
13,002,628 members (69,331 online)
Rate this:
 
Please Sign up or sign in to vote.
I call that function in anchor tag mouseover event. I hide the div when the mouse is over on the anchor tag.

the function is called. The function is running without error. But the div is not hide.

I give the coding is
<a href="#"  önmouseover="projectsclick();" title="Projects"><span   class="icon_block m_projects">Projects </span></a>



function projectsclick() {
       var id = document.getElementById("<%=divprojects.ClientID%>");
       id.style = "display:none";
   }



My div is
<div id="divprojects"  runat="server"  class="switch_bar">
       <ul>

           <li><a href="#"><span class="stats_icon administrative_docs_sl"></span><span class="label">Profile </span></a></li>
           <li><a href="#"><span class="stats_icon finished_work_sl"><span class="alert_notify blue">30 </span></span><span class="label">Take Test </span></a></li>
           <li><a href="#"><span class="stats_icon config_sl"></span><span class="label">Test History </span></a></li>
           <li><a href="#"><span class="stats_icon archives_sl"></span><span class="label">Credits </span></a></li>


       </ul>

   </div>

Anybody help me...
Posted 29-Jan-13 20:20pm
devausha1.5K
Updated 29-Jan-13 20:25pm
v4
Comments
boogac 30-Jan-13 11:13am
   
there is a mistake 'ö'nmouseover ??
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 1

try this

id.style.Display='none';
  Permalink  
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 2

Hi,

Try like the following:

function projectsclick() {
            document.getElementById("<%=divprojects.ClientID%>").css("display","none");
        }



Thanks
  Permalink  
Comments
AshishChaudha 30-Jan-13 4:16am
   
my 5+

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


Advertise | Privacy | Mobile
Web02 | 2.8.170626.1 | Last Updated 30 Jan 2013
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100