Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
Get the referrer in jQuery
jQuery.fn.referrer = function() {
return jQuery(document).prop("referrer").toString();

SeanJA commented Oct 3, 2012

This is a joke... don't use this

Needs more function calls...

return jQuery(document).prop("referrer");



SeanJA commented Oct 4, 2012

@kitcambridge I added your fix, also added a toString... just to make sure it really is for realz a string

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment