2

I am very new to jquery, please help me in running the app on this link. I have added below resource files in my app, but still it is not rendering the color blocks.

These is what I have included in my head tag:

<meta charset="utf-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"/>
<link rel="stylesheet" href="http://code.jquery.com/mobile/1.0rc2/jquery.mobile-1.0rc2.min.css"/>
<script src="http://code.jquery.com/jquery-1.6.4.min.js" type="text/javascript"/>
<script src="http://code.jquery.com/mobile/1.0rc2/jquery.mobile-1.0rc2.min.js" type="text/javascript"/>
<script src="jquery.mobile.carousel.js" type="text/javascript" language="javascript"/>
<script src="jquery.ui.ipad.js" type="text/javascript" language="javascript"/>
<script type="text/javascript" language="javascript"  >
    $(document).ready(function($) {
        $("#carousel1").carousel();
    })(jQuery);
</script>
Candide
  • 30,469
  • 8
  • 53
  • 60
user1065490
  • 305
  • 6
  • 16

4 Answers4

0

You are also using self-closing script tags which aren't always allowed. i.e. switch

<script src="..." type="text/javascript"/> 

for:

<script src="..." type="text/javascript"></script>

see: Why don't self-closing script tags work?

Community
  • 1
  • 1
Mark Rhodes
  • 10,049
  • 4
  • 48
  • 51
0

Seems you are missing the jquery UI framework, Add jquery UI to your head tag

http://code.google.com/apis/libraries/devguide.html#jqueryUI

<script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.16/jquery-ui.min.js" type="text/javascript"/>
feco
  • 4,384
  • 5
  • 27
  • 44
0
  $(function(){
        $("#carousel1").carousel();
});
Yorgo
  • 2,668
  • 1
  • 16
  • 24
0

You have:

<meta charset="utf-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"/>
<link rel="stylesheet" href="http://code.jquery.com/mobile/1.0rc2/jquery.mobile-1.0rc2.min.css"/>
<script src="http://code.jquery.com/jquery-1.6.4.min.js" type="text/javascript"/>
<script src="http://code.jquery.com/mobile/1.0rc2/jquery.mobile-1.0rc2.min.js" type="text/javascript"/>
<script src="jquery.mobile.carousel.js" type="text/javascript" language="javascript"/>
<script src="jquery.ui.ipad.js" type="text/javascript" language="javascript"/>
<script type="text/javascript" language="javascript"  >
    $(document).ready(function($) {
        $("#carousel1").carousel();
    })(jQuery);
</script>

My suggestions would be:

Might look something like:

<meta charset="utf-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"/>
<link rel="stylesheet" href="http://code.jquery.com/mobile/1.0.1/jquery.mobile-1.0.1.min.css" />
<script src="http://code.jquery.com/jquery-1.6.4.min.js"></script>
<script src="http://code.jquery.com/mobile/1.0.1/jquery.mobile-1.0.1.min.js"></script>

<!-- I'm asuming this is where you are getting these from -->
<!-- https://github.com/blackdynamo/jQuery-Mobile-Carousel -->
<script src="jquery-ui-1.8.7.custom.min.js" type="text/javascript" language="javascript"></script>
<script src="jquery.mobile.carousel.js" type="text/javascript" language="javascript"></script>
<script src="jquery.ui.ipad.js" type="text/javascript" language="javascript"></script>


<script type="text/javascript" language="javascript"  >
    $('#pageId').live('pageinit',function(event){
        $("#carousel1").carousel();
    });
</script>
Phill Pafford
  • 83,471
  • 91
  • 263
  • 383