Solved

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

Posted on 2014-09-08
4
269 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

The task A number given should be formatted for easy reading by separating digits into triads. Format must be made inline via JavaScript, i.e., frameworks / functions are not welcome. So let’s take a number like this “12345678.91¿ and format i…
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…

911 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

Need Help in Real-Time?

Connect with top rated Experts

24 Experts available now in Live!

Get 1:1 Help Now