Hello,
Don't feel offended, but could you please rewrite your first post, so as to be more readable and understandable? It would be in your own interest.
- Please use code syntax when you write your code.
Moreover, I think you typed twice the same code (a copy/paste error?).
Eventually, what does your index page looks like? Because you should inject the javascript page containing your second code in the index page, between the jQuery and the jQuery Mobile. Just to be sure you've read the basics for jQuery Mobile.