Jump to content
php.lv forumi
  • 0

jquery show


anonīms

Question

Kādēļ neparādas divs?

function openL()
{
$('#leagues').show();
}

<div id="leagues" onmouseover="mcancelclosetime()" onmouseout="mclosetime()">
..
</div>

Principā ir tā, ka tiek izmantots šis kods:

      var timeout	= 500;
var closetimer	= 0;
var ddmenuitem	= 0;




// open hidden layer
function mopen(id)
{	
// cancel close timer
mcancelclosetime();

// close old layer
if(ddmenuitem) ddmenuitem.style.visibility = 'hidden';

// get new layer and show it
ddmenuitem = document.getElementById(id);
ddmenuitem.style.visibility = 'visible';

}
// close showed layer
function mclose()
{
if(ddmenuitem) ddmenuitem.style.visibility = 'hidden';
}

// go close timer
function mclosetime()
{
closetimer = window.setTimeout(mclose, timeout);
}

// cancel close timer
function mcancelclosetime()
{
if(closetimer)
{
	window.clearTimeout(closetimer);
	closetimer = null;
}
}

// close layer when click-out
document.onclick = mclose; 

bet uz IE7 viņš nestrādā tādēļ izdomāju alternatīvu ar jquery.

ieliekot zem show();

alert(1); alerts izlec, tātad - vaina nevarētu būt js kodā.

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...