.current_page_item a {
font-weight: bold; }
+.current {
+ color: #57b649 !important; }
+
.search-top #searchform {
text-align: left;
display: inline-block;
//console.log('ul = ' + menuImg);
//console.log('menu-id = ' + menuNum);
});
-// var blocks = {
-// init: function (){
-// this.bindEvents();
-// },
-// bindEvents: function (){
-// $('#block-1, #block-2, #block-3, #block-4').bind('click tap', function(){
-// if($(window).width() <= 1024){
-// $(this).toggleClass('front-page-blocks');
-// }
-// });
-// $('#block-1, #block-2, #block-3, #block-4').on("mouseover", function (){
-// if($(window).width() > 1024){
-// $(this).addClass('front-page-blocks');
-// }
-// });
-// $('#block-1, #block-2, #block-3, #block-4').on("mouseout", function (){
-// if($(window).width() > 1024){
-// $(this).removeClass('front-page-blocks');
-// }
-// });
-// }
-// };
-// blocks.init();
$("#searchIcon").click(function(){
if($("#topSearchForm").css("display") == "none"){
// $("#searchform").css("display", "inline");
// remove drop down arrow icons from sub menu items
$("#menu-menu-1").find(".dropdown").children("li").removeClass("has-dropdown");
+
+ // remove #/gallery/recent from url to track current page
+ var url = window.location.href.replace("#/gallery/recent", "");
+
+ // 'current' class style to sidebar item that matches the current url
+ $('#side-links ul.sidebar li a').each(function() {
+ if ($(this).prop('href') == url) {
+ $(this).addClass('current');
+ }
+ if($(this).attr("class") === "current"){
+ $(this).parent("li").addClass("current");
+ }
+ });
+
});
//console.log('ul = ' + menuImg);
//console.log('menu-id = ' + menuNum);
});
-// var blocks = {
-// init: function (){
-// this.bindEvents();
-// },
-// bindEvents: function (){
-// $('#block-1, #block-2, #block-3, #block-4').bind('click tap', function(){
-// if($(window).width() <= 1024){
-// $(this).toggleClass('front-page-blocks');
-// }
-// });
-// $('#block-1, #block-2, #block-3, #block-4').on("mouseover", function (){
-// if($(window).width() > 1024){
-// $(this).addClass('front-page-blocks');
-// }
-// });
-// $('#block-1, #block-2, #block-3, #block-4').on("mouseout", function (){
-// if($(window).width() > 1024){
-// $(this).removeClass('front-page-blocks');
-// }
-// });
-// }
-// };
-// blocks.init();
$("#searchIcon").click(function(){
if($("#topSearchForm").css("display") == "none"){
// $("#searchform").css("display", "inline");
// remove drop down arrow icons from sub menu items
$("#menu-menu-1").find(".dropdown").children("li").removeClass("has-dropdown");
+
+ // remove #/gallery/recent from url to track current page
+ var url = window.location.href.replace("#/gallery/recent", "");
+
+ // 'current' class style to sidebar item that matches the current url
+ $('#side-links ul.sidebar li a').each(function() {
+ if ($(this).prop('href') == url) {
+ $(this).addClass('current');
+ }
+ if($(this).attr("class") === "current"){
+ $(this).parent("li").addClass("current");
+ }
+ });
+
});
}
.current_page_item a {
font-weight: bold;
+}
+.current{
+ color: $green !important;
}
\ No newline at end of file