Skip to content

Instantly share code, notes, and snippets.

@MarkBennett
Created May 17, 2013 18:08
Show Gist options
  • Save MarkBennett/5600858 to your computer and use it in GitHub Desktop.
Save MarkBennett/5600858 to your computer and use it in GitHub Desktop.
An example of seperating business logic from the DOM
function talk_to_webtrends(name, path) {
// Do WebTrends stuff I don't know here
}
$(".web-trends-link").click(function() {
var $elem, name, path;
$elem = $(this);
name = $elem.data("wtName");
path = window.location.path;
talk_to_webtrends(name, path);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment