Valeriia
Valeriia

Reputation: 11

Click on the link doesn't display image in iOS

I can not use JavaScript, because it's off in our app, so I found this hack somewhere in Google. It works well on Android, but doesn't on iOS.

When you click "Open" it must show your image and link "Close"; When you click "Close" it must hide image and show link "Open";

Work in JSFiddle as well: https://jsfiddle.net/Ljuscaz8/

 <div id="show">
     <a href="#show" id="open" class="info-block-link"> Open</a>
     <div id="content">
         <a href="#hide" id="close" class="info-block-link-close"> Close </a>
     </div>
 </div>

and here is css:

#content { 
    display: none !important;
}

#show:target #content {
    display: inline-block !important;
}

#show:target #open {
    display: none !important;
}

Upvotes: 1

Views: 61

Answers (1)

yu.pitomets
yu.pitomets

Reputation: 1840

I've just tried this in Safari and it works just fine.

Upvotes: 1

Related Questions