Advertisement
Guest User

Untitled

a guest
Jun 27th, 2017
47
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.             var coockSet = new Array();
  2.  
  3.             function set_file(curent){
  4.                 var value = $(curent).attr("rel");
  5.                 var status = $(curent).attr("checked");
  6.  
  7.                 if(status == true)   coockSet.push(value);
  8.                 if(status == false){
  9.                     coockSet = jQuery.grep(coockSet, function(val) { return val != value; });
  10.                 }
  11.  
  12.                 console.log(coockSet);
  13.                 set_cook();
  14.             }
  15.  
  16.            function set_cook(){
  17.                 var data = $(coockSet).serializeArray();
  18.                  console.log(data);
  19.                 $.cookie("files", data);
  20.            }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement