daddyz / evercookie

evercookie gem for Ruby on Rails
MIT License
49 stars 27 forks source link

If jQuery is present defer get/set until document is ready #2

Closed opsb closed 11 years ago

opsb commented 11 years ago

The view helpers don't work until the body is loaded, this allows you to use the view helpers in the head if jquery is available.

daddyz commented 11 years ago

@opsb This doesn't work when no jquery is loaded. I am getting "ReferenceError: jQuery is not defined" in FF. You should use "if (typeof jQuery == 'undefined')" to check if jquery is loaded. Fix it and i will merge.

opsb commented 11 years ago

Damn, should have used a typeof check for jquery, will update.

opsb commented 11 years ago

Have replaced the original commit with one that does a proper check for jQuery.

daddyz commented 11 years ago

thanks