Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

now works without cookies

  • Loading branch information...
commit bf367cf6db34c22bc6e18318ce0f99513754b5ed 1 parent 0973368
@danielstocks authored
Showing with 6 additions and 8 deletions.
  1. +1 −2  demo/demo.html
  2. +5 −6 src/jquery.collapse.js
View
3  demo/demo.html
@@ -65,9 +65,8 @@ <h3 class="active">Countries</h3>
</div>
</div>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
- <!--<script src="../../../Assets/jquery.js"></script>-->
- <script src="../src/jquery.collapse.js"></script>
<script src="../src/jquery.cookie.js"></script>
+ <script src="../src/jquery.collapse.js"></script>
<script>
$(".demo").collapse({show: function(){
this.animate({
View
11 src/jquery.collapse.js
@@ -138,15 +138,14 @@
});
// Make sure can we eat cookies without getting into trouble.
- var cookie = true;
- $(function() {
+ var cookieSupport = (function() {
try {
$.cookie('x', 'x', { path: '/', expires: 10 });
+ $.cookie('x', null);
}
catch(e) {
- cookie = false;
- $.cookie('x', null);
+ return false;
}
- });
- var cookieSupport = $.fn.collapse.cookieSupport = cookie;
+ return true;
+ })();
})(jQuery);
Please sign in to comment.
Something went wrong with that request. Please try again.