Tag archives: jQuery

RSS feed of jQuery

jquery grep(),inArray(), map() and join() in javascript

1.jquery grep(): Filtered through an array

   eg.
       var array = [1,2,3,4,5,6,7,8,9];
       var filterarray = $.grep(array,function(value){
           return value > 5;//filter out of more than 5
       });
       for(var i=0;i<filterarray.length;i++){
           alert(filterarray[i]);
       }
       for (key in filterarray){
           alert(filterarray[key]);
       }

2.jquery inArray ...

Continue reading

jQuery plugin - Cookie plug jquery.cookie.js

jQuery Cookie Download: https://codeload.github.com/carhartl/jquery-cookie/legacy.zip/v1.4.1

1. The introduction of jquery.cookie.js

<Script src = "scripts/jquery-1.6.4.js" type = "text/javascript"> </script>
<Script src = "scripts/jquery.cookie.js" type = "text/javascript"> </script>

2. Use

1) add a new session cookie:
$.cookie ...

Continue reading