Solved

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

Posted on 2014-09-08
4
276 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:Murray Brown
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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:Murray Brown
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:Murray Brown
ID: 40323998
thanks
0

Featured Post

Independent Software Vendors: 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

Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
Boost your ability to deliver ambitious and competitive web apps by choosing the right JavaScript framework to best suit your project’s needs.
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…

696 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