1
I programmed a website, and for the menu I used jQuery hoverdrop
. But it doesn’t open at all on iPhone or iPad. Other phones and tablets work normally (it just takes a little longer to load depending on the speed of the internet). What can it be? And how can I solve this problem?
The HTML code I have is:
<html>
<div class="pad1"></div>
<ul id="menu">
<li><a href="index.html">home</a></li>
<li class="sub"><a>curau</a>
<ul>
<li><a href="pg/quemsomos.html">quem somos</a></li>
<li><a href="pg/clipping.html">clipping</a></li>
</ul>
</li>
<li class="sub"><a>portfólio</a>
<ul>
<li><a href="pg/idvisual.html">id visual</a></li>
<li><a href="pg/estamparia.html">estamparia</a></li>
<li><a href="pg/campanha.html">campanhas</a></li>
<li><a href="pg/outrosestudos.html">outros estudos</a></li>
<li><a href="pg/outrostrabalhos.html">outros trabalhos</a></li>
<li><a href="pg/inspiracoes.html">inspirações 2014</a></li>
</ul>
</li>
<li class="sub"><a>coleções</a>
<ul>
<li><a href="pg/venda.html">à venda</a></li>
</ul>
</li>
<li class="sub"><a href="pg/contato.html">contato</a></li>
</ul>
<div class="pad2"></div>
</html>
And the CSS:
.pad1 {width:50px; height:20px; background:#000; display:inline; float:right; margin:3px 3px 0 3px;}
.pad2 {width:50px; height:20px; background:#000; display:inline; float:right; margin:3px 3px 0 0;}
#menu {list-style-type:none; padding:0; margin:0; float:right;}
#menu ul {list-style-type:none; padding:0; margin:0;}
#menu li {float:left; background:#000; margin:3px 3px 0 0; position:relative;}
#menu li.sub {background:#000;}
/* for IE5.5 and IE6 only */
#menu table {border-collapse:collapse;position:absolute;top:0;left:0;z-index:80;font-size:1em;}
#menu li a {display:block; color:#ee0; height:25px; font-family: 'Maven Pro', sans-serif;, cursive; font-size:18px; line-height:24px; width:140px; text-decoration:none; text-align:center;}
#menu :hover,
#menu :focus, {color:#ee0; background:#000;}
#menu :hover > a,
#menu :focus > a {color:#ee0; background:#000;}
#menu ul,
#menu :hover ul ul,
#menu :focus ul ul,
#menu :hover ul :hover ul ul,
#menu :focus ul :focus ul ul,
#menu :hover ul :hover ul ul.left,
#menu :focus ul :focus ul ul.left {position:absolute; left:-9999px; width:140px;}
#menu :hover ul,
#menu :focus ul{left:0;top:25px; background:url(transparent.gif);} /* the background image is for IE7 */
#menu :hover ul :hover ul,
#menu :focus ul :focus ul,
#menu :hover ul :hover ul :hover ul,
#menu :focus ul :focus ul :focus ul {padding:0 3px; left:125px; top:-3px;}
#menu :hover ul :hover ul.left,
#menu :focus ul :focus ul.left,
#menu :hover ul :hover ul :hover ul.left,
#menu :focus ul focus ul :focus ul.left {padding:0 3px; left:-131px; top:-3px;}
But this problem is happening in Safari?
– Jefferson Alison
Yes. I tested for Safari. I will test for another browser.
– Line
Could you give some link? I couldn’t find this plugin.
– Gustavo Rodrigues
The link to www.curau.com.br
– Line
Already tried to join
:focus
to CSS also?– Sergio
I have tried :Focus and also tried :active @Sergio.
– Line
But hoverdrop has nothing with jQuery! The only script that comes with it is to fix an error with Internet Explorer. What this does is organize a menu using the pseudo-selector
:hover
. I couldn’t choose another menu of these examples? This type is not optimized for cell phones.– Gustavo Rodrigues
But the question is why does it open on any phone other than Iphone? @Gustavorodrigues But anyway I will try to choose another and test.
– Line
:hover
; Conclusion: the other cell phones are simulating the action of:hover
while iPhone is not.– Gustavo Rodrigues