Created

Embed URL

HTTPS clone URL

SSH clone URL

You can clone with HTTPS or SSH.

Download Gist

Get the referrer in jQuery

View jquery.referrer.js
1 2 3 4 5 6
jQuery.fn.referrer = function() {
return jQuery(document).prop("referrer").toString();
};
 
//usage:
jQuery().referrer()
Owner

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

Needs more function calls...

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

VoilĂ !

Owner

@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
Something went wrong with that request. Please try again.