jquery - JavaScript not working in Mobile Safari -


ok, problem js code using not work in mobile safari straight away. works fine in desktop safari, chrome, etc.

in mobile safari (iphone 4 , ipod touch 2nd gen tested) page blank. if navigate page , click back, loads fine!

could tell me on earth happening here?

thanks :)

here link site

http://osmithcouk.ipage.com/exposed/index.php

and here js code

note have edited code since ryuutatsuo recommended still not working :(

<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.js" type="text/javascript"></script> <script type="text/javascript">  $(document).ready(function(){          $(".slidingdiv").hide();         $(".show_hide").show();      $('.show_hide').click(function(){     $(".slidingdiv").slidetoggle();     });  }); 

and here html goes alongside that.

<a href="#" class="show_hide"><b><?php include 'headline1.txt'; ?></b></a> <div class="slidingdiv"> <?php include 'story1.txt'; ?> <a href="#" class="show_hide">hide story...</a></div> 

and css slidingdiv , show_hide.

.slidingdiv {     background-color: #ffffff;     padding:20px;     margin-top:10px; }  .show_hide {     display:none; } 

thank :)

i don't know if proper protocol have fixed myself thought post answer!

it simple, moved js below .css. apparently safari has problem rendering jquery before css :s


Comments

Popular posts from this blog

c# - SharpSVN - How to get the previous revision? -

c++ - Is it possible to compile a VST on linux? -

url - Querystring manipulation of email Address in PHP -