Advertisement
Ortund

Untitled

Jul 20th, 2013
114
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 5 1.58 KB | None | 0 0
  1. <h3>Filter by Category:</h3>
  2. <ul>
  3.     <li style="display: inline;"><a id="dotnet" href="#">Microsoft.NET</a></li>
  4.     <li style="display: inline;"><a id="jquery" href="#">JQuery</a></li>
  5.     <li style="display: inline;"><a id="front-end" href="#">Front End</a></li>
  6. </ul>
  7. <ul>
  8.     <li class="front-end"><a href="articles/do-it-yourself-rich-text-editing">Do It Yourself Rich Text Editing</a></li>
  9.     <li class="dotnet"><a href="articles/file-download-with-asp-net">File Download With ASP.NET</a></li>
  10.     <li class="dotnet"><a href="articles/forms-authentication-in-asp-net">Forms Authentication in ASP.NET</a></li>
  11.     <li class="dotnet"><a href="articles/function-overloading">Function Overloading in ASP.NET</a></li>
  12.     <li class="jquery"><a href="articles/jquery-menu-selection">JQuery Menu Selection</a></li>
  13. </ul>
  14.  
  15. <script>
  16.     $frontEndListItem = $("li.front-end");
  17.     $dotNetListItem = $("li.dotnet");
  18.     $jqueryListItem = $("li.jquery");
  19.  
  20.     $("#front-end").click(function() {
  21.     jQuery.each($dotNetListItem, function() {
  22.         $dotNetListItem.hide(400);
  23.     });
  24.    
  25.     jQuery.each($jqueryListItem, function() {
  26.         $jqueryListItem.hide(400);
  27.     });
  28.     });
  29.  
  30.     $("#dotnet").click(function() {
  31.     jQuery.each($jqueryListItem, function() {
  32.         $jqueryListItem.hide(400);
  33.     });
  34.    
  35.     jQuery.each($frontEndListItem, function() {
  36.         $frontEndListItem.hide(400);
  37.     });
  38.     });
  39.  
  40.     $("#jquery").click(function() {
  41.     jQuery.each($dotNetListItem, function() {
  42.         $dotNetListItem.hide(400);
  43.     });
  44.    
  45.     jQuery.each($frontEndListItem, function() {
  46.         $frontEndListItem.hide(400);
  47.     });
  48.     });
  49. </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement