blob: 5e418bd56d71e9269d6e3e75184b71f90bb4610a (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
|
var carousel = "";
$(document).ready(function() {;
// Starting up carousel
carousel = $('.carousel').carousel({
interval: 9999999999999
})
// Rollover images
$(function() {
$('img[data-hover]').hover(function() {
$(this).attr('tmp', $(this).attr('src')).attr('src', $(this).attr('data-hover')).attr('data-hover', $(this).attr('tmp')).removeAttr('tmp');
}).each(function() {
$('<img />').attr('src', $(this).attr('data-hover'));
});;
});
// Slide selector
$(".navbar .nav li a").click(function() {
function clear_prods() {
$(".navbar .nav li").each(function(){
$(this).removeClass("active");
});
}
carousel.unbind('slide');
clear_prods();
$(this).parent().addClass("active");
carousel.carousel($(this).data()["slide"]);
carousel.carousel('stop');
carousel.bind('slide', function() {
clear_prods();
carousel.unbind('slide');
});
});
if ($("#docs h2").length == 0){
$("#docs-nav").remove();
}else{
$("<ul/>").insertAfter("#docs-nav");
$("#docs h2").each(function(){
$("<li><a href=\"#" + $(this).attr("id") + "\">" + $(this).text() + "</a></li>").appendTo("#docs-nav+ul");
});
}
});
|