New module bootstrapTheme
pulled out bootstrap theme from blechreiz main module - to reuse
This commit is contained in:
63
bootstrapTheme/static/js/theme.js
Normal file
63
bootstrapTheme/static/js/theme.js
Normal file
@@ -0,0 +1,63 @@
|
||||
$(function () {
|
||||
$(window).scroll(function() {
|
||||
if ($(".navbar").offset().top>30) {
|
||||
$(".navbar-inner").addClass("sticky");
|
||||
}
|
||||
else {
|
||||
$(".navbar-inner").removeClass("sticky");
|
||||
}
|
||||
});
|
||||
|
||||
// Flex
|
||||
if ($(".flexslider").length) {
|
||||
$('.flexslider').flexslider();
|
||||
}
|
||||
|
||||
servicesCircle.initialize();
|
||||
|
||||
staticHeader.initialize();
|
||||
|
||||
portfolioItem.initialize();
|
||||
});
|
||||
|
||||
var portfolioItem = {
|
||||
initialize: function () {
|
||||
var $container = $("#portfolio_tem .left_box");
|
||||
var $bigPics = $container.find(".big img");
|
||||
var $thumbs = $container.find(".thumbs .thumb");
|
||||
|
||||
$bigPics.hide().eq(0).show();
|
||||
|
||||
$thumbs.click(function (e) {
|
||||
e.preventDefault();
|
||||
var index = $thumbs.index(this);
|
||||
$bigPics.fadeOut();
|
||||
$bigPics.eq(index).fadeIn();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
var staticHeader = {
|
||||
initialize: function () {
|
||||
if ($(".navbar-static-top").length) {
|
||||
$("body").css("padding-top", 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
var servicesCircle = {
|
||||
initialize: function () {
|
||||
var $container = $(".services_circles");
|
||||
var $texts = $container.find(".description .text");
|
||||
var $circles = $container.find(".areas .circle");
|
||||
|
||||
$circles.click(function () {
|
||||
var index = $circles.index(this);
|
||||
$texts.fadeOut();
|
||||
$texts.eq(index).fadeIn();
|
||||
$circles.removeClass("active");
|
||||
$(this).addClass("active");
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user