html - iPhone (Safari) anchor tags don't work as intended -


i'm having trouble specific browser/device need serve website.

essentially, have anchor tags display hidden element when clicked. works intended on (firefox/chrome/ie on pc, android ff/chrome/browser) except ios. when clicking "view bio" link, text should transition in , displayed. when doing on ios grey box hovers on element (so assume knows there there), not show hidden element.

after doing research can see there may issue way ios deals "onclick" or effect. have tried implement few different things (mainly java-based) though haven't worked. may not need do, implementation purely html/css based, i've tried i've come across. of fixes involved don't involve hidden elements, , more simple "scroll point" implementations. it's same thing.

as far can tell, there sort of bug or dislike of anchor tags ios, articles/existing pages have read. may not applicable, according users ios not serve "onclick" or "click", , rather uses form of "touch".

is there workaround this? shouldn't matter if it's little messy, long serves ios users intended. if there's way listen "click" , treat "touched" ios simplest solution. i'm no expert, off mark.

my code:

<div class="dimg"> <img src="images/profile_1.png" alt="director1" height="200" width="200" class="img-responsive" style="border:2px solid #535353;"> </div>  <a href="#" class="showme" onclick="return false">view bio</a> <div id="desk" class="trans">   <p>this text displayed when anchor clicked</p> 

css:

.showme {  text-decoration:none;  color:#535353;  letter-spacing:1px;  }  .showme:focus + #desk {  opacity:1;  visibility:visible;  position:relative;  }  #desk { visibility:hidden; opacity:0; position:absolute; border-radius:10px; margin-top:10px; text-align:left; } 

there problem css :focus on ios safari.

the answers this question seem work. need add tabindex="1" link:

<a href="#" class="showme" onclick="return false" tabindex="1">view bio</a> 

https://jsfiddle.net/1kqxopzs/


Comments

Popular posts from this blog

php - How to display all orders for a single product showing the most recent first? Woocommerce -

asp.net - How to correctly use QUERY_STRING in ISAPI rewrite? -

angularjs - How restrict admin panel using in backend laravel and admin panel on angular? -