Solved

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

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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

This article will give core knowledge of JavaScript and will head in to your first JavaScript program. I am Durvesh Naik and I am here to deal with this series of JavaScript. I will teach you JavaScript in part wise , as its quite boring to read big…
JavaScript can be used in a browser to change parts of a webpage dynamically. It begins with the following pattern: If condition W is true, do thing X to target Y after event Z. Below are some tips and tricks to help you get started with JavaScript …
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…

792 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