Jump to content
php.lv forumi
  • 0

jquery show


Question

Posted

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ā.

2 answers to this question

Recommended Posts

  • 0
Posted

Nu riktīgi dīvaini. Bija visibilty izmantots display:none vietā. Tādēļ show neko nedeva.

Bet par to paranormālo. Caur FF, Chrome viss iet ideāli, bet caur IE7 neiet nekas.

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...