Skip to content

Instantly share code, notes, and snippets.

@UncleKo
UncleKo / a Sample of gruntfile.js
Last active August 29, 2015 14:07
a Sample of gruntfile.js
module.exports = function(grunt) {
grunt.loadNpmTasks('grunt-contrib-connect');
grunt.loadNpmTasks('grunt-open');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-contrib-compass');
grunt.initConfig({
connect: {
server: {
@UncleKo
UncleKo / an Accordion Menu Sample
Last active August 29, 2015 13:57
Just a sample for according menu using jQuery. I took this approach to keep the opening status to a liked page; it might be much easier than using cookie or other approaches. Here's a living example if you would like check html code: http://shrewd-design.com/blog/
$(function () {
var widgetAccordion = function() {
var $widget = $('aside .widget'),
// set the default status for the blog top page
dft = true;
$widget.children('ul').each( function() {