Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html lang="en">
- <head>
- <title>Loop toggle</title>
- <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
- <script type="application/x-javascript">
- $(document).ready(function(){
- $('#toggle-grid').click(function(){
- $('#grid').show();
- $('#list').hide();
- });
- $('#toggle-list').click(function(){
- $('#list').show();
- $('#grid').hide();
- });
- });
- </script>
- <style type="text/css">
- #list {display:none;}
- </style>
- </head>
- <body>
- <a href="#" id="toggle-grid" class="toggle">Toggle Grid</a>
- <a href="#" id="toggle-list" class="toggle">Toggle List</a>
- <div id="grid">
- // grid wordpress loop here
- </div>
- <div id="list">
- // list wordpress loop here
- </div>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement