Reputation Activity
-
madbytes reacted to andy9l in How to set active nav using jQueryThis should do it, although you really have approached this in the wrong way...
function setActiveNavigation() { //store location of each div var $home = $('#front-page').offset().top - $(window).scrollTop() - 80; var $about = $('#aboutme').offset().top - $(window).scrollTop() - 80; var $work = $('#projects').offset().top - $(window).scrollTop() - 80; var $contact = $('#contactme').offset().top - $(window).scrollTop() - 80; //set active to none var $active = '#none'; //set active to id once scrolled up/down to it if($home < 100) $active = '#front-page'; if($about < 100) $active = '#aboutme'; if($work < 100) $active = '#projects'; if($contact < 100) $active = '#contactme'; //array of class names: array[href] = class_name var classes = new Array(); classes['#front-page'] = 'home-current'; classes['#aboutme'] = 'aboutme-current'; classes['#projects'] = 'projects-current'; classes['#contactme'] = 'contactme-current'; //remove all current classes $('#main-nav li').each(function(){ var noCurrentClass = $(this).attr("class").replace(/ ?[a-z]+-current/ig, ''); $(this).attr("class", noCurrentClass); }); //add appropriate current class $('#main-nav a[href=' + $active + ']').parent().addClass(classes[$active]); } //activate current nav on scroll setActiveNavigation(); $(window).scroll(function() { setActiveNavigation(); });
Edit: Sorry about tab spacing - something went wrong.
-
madbytes reacted to user-removed in Anyone know how I could achieve this?Easy.
http://jsfiddle.net/ujWcW/1/embedded/result/
-
madbytes reacted to Bomb in Anyone know how I could achieve this?Slick.
-
madbytes got a reaction from Kirk Freeman in canvas size for web template (photoshop)Check out 960.gs website. You can download Photoshop template that has basic grid and is set for 960px width.
-
madbytes got a reaction from Renaissance-Design in Slicing photoshop PSDsI am sure slice tool is great but that's not the way I do it.
My process usually ends up being keyboard shortcuts (M) rec. marquee tool, (Z) zoom tool and good old shift+cmd+C to copy merged. That is basically it, I just zoom in, select with rec. marquee tool and copy merged. Then cmd+N to open new file and cmd+V to paste. Then save for web, and back again. Probably not the best process but it works for me, which I am fast and precise in.
Maybe this would work for you too?
-
madbytes got a reaction from MikeChipshop in Slicing photoshop PSDsI am sure slice tool is great but that's not the way I do it.
My process usually ends up being keyboard shortcuts (M) rec. marquee tool, (Z) zoom tool and good old shift+cmd+C to copy merged. That is basically it, I just zoom in, select with rec. marquee tool and copy merged. Then cmd+N to open new file and cmd+V to paste. Then save for web, and back again. Probably not the best process but it works for me, which I am fast and precise in.
Maybe this would work for you too?
-
madbytes got a reaction from Ashley Byrom in Slicing photoshop PSDsI am sure slice tool is great but that's not the way I do it.
My process usually ends up being keyboard shortcuts (M) rec. marquee tool, (Z) zoom tool and good old shift+cmd+C to copy merged. That is basically it, I just zoom in, select with rec. marquee tool and copy merged. Then cmd+N to open new file and cmd+V to paste. Then save for web, and back again. Probably not the best process but it works for me, which I am fast and precise in.
Maybe this would work for you too?