Title / Description
Code class SubFilters extends Filters constructor: () -> @container = "#container" @list = ".blog .filters li" @links = ".blog .filters li a" @css = "selected" @main_filters = "#blog_filters .filters li a" # @heading = "Case studies - Loading" # @title = "#cs-title" @title_end = " | Adrian Stainforth ::: UX | Frontend | Backend" init: -> @add_click(); add_click: -> item = this # console.log($(@links)) $(@container).on "click", @links, -> url = $(this).attr('href') pt = item.pagetitle($(this).attr("title")) $.getScript(url) history.pushState({hist_test:true, pagetitle:pt}, pt, url) if (history && history.pushState) item.set_loader() item.set_highlighted(url) false set_highlighted: (url) -> $(@main_filters).each (i)-> if $(this).attr('href') == href $(this).parent().addClass("selected")
Author
Highlight as C C++ CSS Clojure Delphi ERb Groovy (beta) HAML HTML JSON Java JavaScript PHP Plain text Python Ruby SQL XML YAML diff code