how to use jquery.metro.js ? Unable to get it working?
I checked out the example given on http://naghsheh.info/Pivot/Pivot.htm and tried to get it work on a simple htm page. I have downloaded jquery.metro.js, jquery-1.6.1.min.js, and jquery.metro.css files and kept it in the same folder as html file. But the final html doesn't work as given. Below is the code I am using
<html>
<head>
<script type="text/javascript" src="jque开发者_C百科ry-1.6.1.min.js"></script>
<script type="text/javascript" src="jquery.metro.js"></script>
<link type="text/css" rel="Stylesheet" href='jquery.metro.css' />
</head>
<body>
<script type="text/javascript">
$(function () {
$("div.metro-pivot").metroPivot();
});
</script>
<div class='metro-pivot'>
<div class='pivot-item'>
<h3>your header text</h3>
your content 1
</div>
<div class='pivot-item'>
<h3>header two</h3>
your content more content 2
</div>
</div>
</body>
</html>
Please help me out!
I noticed that mine stopped working when I upgraded jQuery to 1.6.1. I had to revert to jQuery 1.5.1.
Also, put the script tag with "$("div.metro-pivot").metroPivot();" at the end of the page, after the divs have been loaded.
精彩评论