I have never used jquery before, and I am trying to use it on a UIWebView, I though it would be easy but clearly I must be missing something obvious, I kinda followed this SO JQuery Mobile not working inside UIWebView
I am loading a dynamic html string into my UIWebView and I append at the beginning some styling loaded from a local html file (this works fine), it is something like this:
<html>
<head>
<style>
//Some style...
</style>
<link rel="stylesheet" href="jquery.mobile-1.3.1.min.css"/> //Is this what i have to do to load it??
<script src="jquery.mobile-1.3.1.min.js"></script> //Is this what I have to do load it???
//Closing tags...
I also went to jquerymobile.com downloads and got this 2 files:
jquery.mobile-1.3.1.min.css
jquery.mobile-1.3.1.min.js
Which I removed from compile sources and added to copy bundle resources, as suggested in the post above.
Then In body I simply added this sample code from http://jquerymobile.com/demos/1.3.0-rc.1/docs/content/content-collapsible.html
<div data-role="collapsible">
<h3>I'm a header</h3>
<p>I'm the collapsible content. By default I'm closed, but you can click the header to open me.</p>
</div>
It is my understanding that after doing this, I should be able to tap the div and it would expand and collapse. Right know it just shows all the text in there tapping does nothing.
Any help on what I am missing or a step by step guide would be awesome.
Thank you