This week only. Pastebin PRO Accounts Christmas Special! Don't miss out!Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Jun 12th, 2013  |  syntax: None  |  size: 0.61 KB  |  views: 34  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. var zzz = $(this).val();
  2.        
  3. var zzz = $(this).val();
  4. $('li.' + zzz).show();
  5.        
  6. $(document).ready(function(){
  7.  
  8.     // Add onclick handler to checkbox w/id checkme
  9.    $("#fcheck input").click(function(){
  10.  
  11.     // If checked
  12.     if ($("#fcheck input").is(":checked"))
  13.     {
  14.         //show the hidden div
  15.         var zzz = $(this).val();
  16.         $('li.' + zzz).show();
  17.     }
  18.     else
  19.     {
  20.         //otherwise, hide it
  21.         var yyy = $(this).val();
  22.         $('li.' + yyy).hide();
  23.     }
  24.   });
  25.  
  26. });
  27.        
  28. $("#fcheck input").click(function(){
  29.     var $this = $(this);
  30.     $('li.' + $this.val()).toggle($this.is(":checked"));
  31. });
clone this paste RAW Paste Data