Solved

ASP.net VB.net website error trying to create an orientation change for mobiles

Posted on 2014-09-08
4
275 Views
Last Modified: 2014-09-15
Hi
I included the following code in my ASP.net website in order to enable an orientation change when the user flips a mobile device but on running this I get the error shown below

    <script type="text/javascript">
 $(window).on("orientationchange",function(){
    alert("The orientation has changed!");
  });
 </script>

1
0
Comment
Question by:murbro
  • 2
  • 2
4 Comments
 
LVL 82

Expert Comment

by:leakim971
ID: 40310751
add jQuery pluginS too
https://developers.google.com/speed/libraries/devguide#jquery

<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script src="//ajax.googleapis.com/ajax/libs/jquerymobile/1.4.3/jquery.mobile.min.js"></script>
0
 
LVL 82

Accepted Solution

by:
leakim971 earned 500 total points
ID: 40310754
Check this page : http://jquerymobile.com/download/

if you need CSS add it too :
<link rel="stylesheet" href="//ajax.googleapis.com/ajax/libs/jquerymobile/1.4.3/jquery.mobile.min.css" />
0
 

Author Comment

by:murbro
ID: 40311503
Thanks. Where do I insert that in my code? I put it just above the code that caused the error and it just said that it wasn't recognised
0
 

Author Closing Comment

by:murbro
ID: 40323998
thanks
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

749 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question