1

I use a ASP.NET MVC 4 project. In my web page Index.cshtml, I especially added this lines to use the plugin Mobiscroll 2.12.0:

<link href="@Url.Content("~/Content/css/mobiscroll.widget.css")"  media="screen and (orientation:landscape)" rel="stylesheet" type="text/css" />
<link href="@Url.Content("~/Content/css/mobiscroll.scroller.css")"  media="screen and (orientation:landscape)" rel="stylesheet" type="text/css" />
<script src="~/Scripts/mobiscroll.core.js"></script>
<script src="~/Scripts/mobiscroll.scroller.js"></script>
<script>
    $(document).ready(function () {
        $('#demo').mobiscroll().$(document).ready(function () {

        $('#demo').mobiscroll().timespan({
            wheelOrder: 'ddhhii',
            theme: 'mobiscroll',
            display: 'bottom',
            mode: 'scroller'
        });
    });

</script>  

I notice that it doesn't recognize the function 'timespan' because if I just execute '$('#demo').mobiscroll()', it works. When I print the web page and that I go to the console log of Google Chrome, I've the following error :

Uncaught TypeError: undefined is not a function 

I don't know why

Can you help me ?

Thank you

user2274060
  • 896
  • 5
  • 18
  • 35

1 Answers1

0

Hi i also had the same problem while building an ionic app. But it worked for me by making sure to include jquery file at the top of all scripts in index.html. Hope this helps

Gaurav Sarma
  • 2,248
  • 2
  • 24
  • 45