Note that there are some explanatory texts on larger screens.

plurals
  1. POSliding jQuery panel not working on iPad
    primarykey
    data
    text
    <p>I have been playing with Wordpress and jQuery - both new to me. The blog I am working on has a fixed header at the top of the page with two buttons, each of which slides down a panel over the blog content using jQuery.</p> <p>The problem is that on the iPad nothing happens when the buttons are clicked - apart from, for some reason, it loads the infinite scroll. I have heard that IOS doesn't like position:fixed but I don't understand what impact this could have on the buttons/sliding content. Any info/tips would be greatly received.</p> <p>*<strong>Edit: It would seem .click won't work(?) on the iPad and I need to somehow swap it for a touch event.</strong> </p> <p>CSS</p> <pre><code>&gt; .about, .contact { &gt; background: none repeat scroll 0 0 #000000; &gt; display: none; &gt; height: 500px; &gt; position: fixed; &gt; top: 90px; &gt; width: 100%; &gt; z-index: 100; } </code></pre> <p>jQuery</p> <pre><code> $('.about_btn').click(function(e) { if($(this).hasClass('open')) { $('.about').slideToggle('slow'); $('.about_btn').removeClass('open'); return false; } else { $('.about').slideToggle('slow'); $('.contact').hide(); $('.about_btn').addClass('open'); $('.contact_btn').removeClass('open'); } }); $('.contact_btn').click(function(e) { if($(this).hasClass('open')) { $('.contact').slideToggle('slow'); $('.contact_btn').removeClass('open'); return false; } else { $('.contact').slideToggle('slow'); $('.about').hide(); $('.contact_btn').addClass('open'); $('.about_btn').removeClass('open'); } }); $('.close').click(function(e) { e.preventDefault(); $('.about').slideUp('slow'); $('.contact').slideUp('slow'); $('.about_btn').removeClass('open'); $('.contact_btn').removeClass('open'); }); </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload