Skip to content
This repository has been archived by the owner on Nov 15, 2017. It is now read-only.

loading jquery overwrites cookie library #14

Closed
glensc opened this issue May 9, 2011 · 3 comments
Closed

loading jquery overwrites cookie library #14

glensc opened this issue May 9, 2011 · 3 comments

Comments

@glensc
Copy link

glensc commented May 9, 2011

loading:

  • jquery.js
  • jquery.cookie.js
  • jquery.js

causes $.cookie to dissapear. maybe jQuery core allows to prevent this?

<!doctype html>
<head>
<title>cookie test</title>
<script type="text/javascript" src="http://code.jquery.com/jquery-1.6.min.js"></script>
<script type="text/javascript" src="https://github.com/carhartl/jquery-cookie/raw/67fb34f6a866c40d0570265e8fa5911605d92616/jquery.cookie.js"></script>
<script type="text/javascript" src="http://code.jquery.com/jquery-1.6.min.js"></script>
</head>
<body>
<script type="text/javascript">
document.write($.cookie)
</script>
</body>
</html>

results:
undefined

@carhartl
Copy link
Owner

carhartl commented May 9, 2011

Nothing I am aware of. And it seems a bit like saying 'delete $.cookie' is breaking things to me... no?

@carhartl carhartl closed this as completed May 9, 2011
@glensc
Copy link
Author

glensc commented May 10, 2011

i had a feeling that one can bind better via $.fn.cookie, but seems i was mistaken and i can't find references doing otherwise

@carhartl
Copy link
Owner

$.fn.foo is for creating methods that do iterate over a result.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants