<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-4887901464765337982</id><updated>2011-07-08T01:58:01.053-07:00</updated><category term='logging'/><category term='jquery'/><category term='web development'/><category term='javascript'/><category term='plugin'/><category term='web'/><category term='web design'/><title type='text'>talk-n</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://talk-n.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4887901464765337982/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://talk-n.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Russell</name><uri>http://www.blogger.com/profile/07489586762292621528</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://1.bp.blogspot.com/_QtzucP-SyB0/S9m9XhvXpbI/AAAAAAAAAeY/s1t5Vg74aJw/S220/P1000785.JPG'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>2</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-4887901464765337982.post-4365330159887865177</id><published>2010-02-04T13:19:00.000-08:00</published><updated>2010-02-04T13:19:53.537-08:00</updated><title type='text'>Quick accordion list with jQuery</title><content type='html'>&lt;p&gt;Check out the 3 line simple accordion with jquery (so don't forget to include jquery 1.4 in your project)&lt;/p&gt;&lt;br /&gt;&lt;style&gt;.codeframe{display:block;border:1px solid #333;padding:2px 5px; height:250px; width: 388px; overflow:auto;}.codeframe pre{ color:#555; display:block; width:550px; height:auto; }&lt;/style&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;HTML markup&lt;/p&gt;&lt;div class="codeframe"&gt;&lt;pre&gt;&amp;lt;dt class="hiddenList-target"&amp;gt;heading 1&amp;lt;/dt&amp;gt;&lt;br /&gt;  &amp;lt;dd class="hiddenList"&amp;gt;  &lt;br /&gt;   &amp;lt;ul&amp;gt;&lt;br /&gt;   &amp;lt;li&amp;gt;&amp;lt;a href="#"&amp;gt;test&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;   &amp;lt;li&amp;gt;&amp;lt;a href="#"&amp;gt;test&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;   &amp;lt;li&amp;gt;&amp;lt;a href="#"&amp;gt;test&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;   &amp;lt;li&amp;gt;&amp;lt;a href="#"&amp;gt;test&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;   &amp;lt;/ul&amp;gt;&lt;br /&gt;  &amp;lt;/dd&amp;gt;&lt;br /&gt;  &lt;br /&gt;&amp;lt;dt class="hiddenList-target"&amp;gt;heading 2&amp;lt;/dt&amp;gt;&lt;br /&gt;  &amp;lt;dd class="hiddenList"&amp;gt;  &lt;br /&gt;   &amp;lt;ul&amp;gt;&lt;br /&gt;   &amp;lt;li&amp;gt;&amp;lt;a href="#"&amp;gt;test&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;   &amp;lt;li&amp;gt;&amp;lt;a href="#"&amp;gt;test&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;   &amp;lt;li&amp;gt;&amp;lt;a href="#"&amp;gt;test&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;   &amp;lt;li&amp;gt;&amp;lt;a href="#"&amp;gt;test&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;   &amp;lt;/ul&amp;gt;&lt;br /&gt;  &amp;lt;/dd&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt;&lt;br /&gt;&lt;p&gt;The base CSS&lt;/p&gt;&lt;div class="codeframe"&gt;&lt;pre&gt;.hiddenList-target&lt;br /&gt; { cursor:pointer; font-weight:700; margin-bottom:20px; }&lt;br /&gt; &lt;br /&gt;.hiddenList&lt;br /&gt; { margin-bottom:20px; display:none;}&lt;br /&gt; &lt;br /&gt; .hiddenList li&lt;br /&gt;  { list-style:disc; list-style-position:inside; margin-left:10px; }&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt;&lt;br /&gt;&lt;p&gt;The javascript&lt;/p&gt;&lt;div class="codeframe"&gt;&lt;pre&gt;&lt;span style="color:green;"&gt;/* cache dom into vars */&lt;/span&gt;&lt;br /&gt;var hiddenListTargets = $(".hiddenList-target");&lt;br /&gt;var hiddenLists = $(".hiddenList");&lt;br /&gt;&lt;br /&gt;&lt;span style="color:green;"&gt;/* accordion */&lt;/span&gt;&lt;br /&gt;hiddenListTargets.click( function(){&lt;br /&gt; hiddenLists.not(this).slideUp(400);&lt;br /&gt; $(this).next(".hiddenList").stop().slideToggle(400);&lt;br /&gt;});&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4887901464765337982-4365330159887865177?l=talk-n.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://talk-n.blogspot.com/feeds/4365330159887865177/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://talk-n.blogspot.com/2010/02/quick-accordion-list-with-jquery.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4887901464765337982/posts/default/4365330159887865177'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4887901464765337982/posts/default/4365330159887865177'/><link rel='alternate' type='text/html' href='http://talk-n.blogspot.com/2010/02/quick-accordion-list-with-jquery.html' title='Quick accordion list with jQuery'/><author><name>Russell</name><uri>http://www.blogger.com/profile/07489586762292621528</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://1.bp.blogspot.com/_QtzucP-SyB0/S9m9XhvXpbI/AAAAAAAAAeY/s1t5Vg74aJw/S220/P1000785.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4887901464765337982.post-2647351851492593980</id><published>2010-01-22T10:03:00.000-08:00</published><updated>2010-01-22T10:26:51.370-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='javascript'/><category scheme='http://www.blogger.com/atom/ns#' term='web development'/><category scheme='http://www.blogger.com/atom/ns#' term='web design'/><category scheme='http://www.blogger.com/atom/ns#' term='plugin'/><category scheme='http://www.blogger.com/atom/ns#' term='logging'/><category scheme='http://www.blogger.com/atom/ns#' term='jquery'/><category scheme='http://www.blogger.com/atom/ns#' term='web'/><title type='text'>jQuery Message Logging  &amp; Debugging</title><content type='html'>&lt;p&gt;Below is a helpful bit of code:  My jquery solution to debugging / logging.  It came up out of necessity really... necessity because I was tired of having to remember to pull my logging info out of the page before previewing in IE(which does not allow console).  Instead of having to deal with the hassle, my script allows for enabling logging, then detecting if console is present.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;This is helpful for someone who may want an inside look about what is happening behind the scenes in your app.  Warnings and info are always helpful when trying to figure out what a previous developer did without having to search through code.&lt;br /&gt;&lt;/p&gt;&lt;style&gt;.codeframe{display:block;border:1px solid #333;padding:2px 5px; height:250px; width: 388px; overflow:auto;}.codeframe pre{ color:#555; display:block; width:550px; height:auto; }&lt;/style&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="codeframe"&gt;&lt;pre&gt;/**&lt;br /&gt;* $.log(m, x)&lt;br /&gt;* @author Russell Madsen russell [at] madsendev.com&lt;br /&gt;* @version Jan.2010&lt;br /&gt;* @url http://www.madsendev.com/&lt;br /&gt;*&lt;br /&gt;* @param m: The message you are wanting to log - it &lt;br /&gt;*           could be an object, or string&lt;br /&gt;* @param x: The logging classification&lt;br /&gt;*/&lt;br /&gt;&lt;br /&gt;// set to false for production &lt;br /&gt;//    this can be located away from the function &lt;br /&gt;//    like in the initialization of the app.&lt;br /&gt;var logger = true;&lt;br /&gt;&lt;br /&gt;$.log = function(m, x){&lt;br /&gt;//if logging is enabled, allow user to log messages&lt;br /&gt;if (!logger) {return false;}  &lt;br /&gt;else if('console' in window &amp;&amp; console.debug) {   &lt;br /&gt;// Actions for console enabled browsers:&lt;br /&gt;switch(x){&lt;br /&gt;case  'debug':console.debug(m);break;&lt;br /&gt;case  'error':console.error(m);break;&lt;br /&gt;case  'info': console.info(m);break;&lt;br /&gt;case  'warn': console.warn(m);break;&lt;br /&gt;default:  console.log(m); break;&lt;br /&gt;}&lt;br /&gt;} else {&lt;br /&gt;// Actions for browsers without console:&lt;br /&gt;// I don't like logging to alerts, but its definitely &lt;br /&gt;//      a necessity sometimes&lt;br /&gt;// alert(m);&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;/*&lt;br /&gt;* Implementation : use the appropriate type of logging, &lt;br /&gt;* or be lazy and use no logging classification to fall &lt;br /&gt;* back to the default&lt;br /&gt;*/ &lt;br /&gt;$.log('debug test', 'debug' );&lt;br /&gt;$.log('error test', 'error' );&lt;br /&gt;$.log('info test', 'info' );&lt;br /&gt;$.log('warn test', 'warn' );&lt;br /&gt;$.log('log test with argument', 'log' );&lt;br /&gt;$.log('log test without argument');&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4887901464765337982-2647351851492593980?l=talk-n.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://talk-n.blogspot.com/feeds/2647351851492593980/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://talk-n.blogspot.com/2010/01/jquery-message-logging-debugging.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4887901464765337982/posts/default/2647351851492593980'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4887901464765337982/posts/default/2647351851492593980'/><link rel='alternate' type='text/html' href='http://talk-n.blogspot.com/2010/01/jquery-message-logging-debugging.html' title='jQuery Message Logging  &amp; Debugging'/><author><name>Russell</name><uri>http://www.blogger.com/profile/07489586762292621528</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://1.bp.blogspot.com/_QtzucP-SyB0/S9m9XhvXpbI/AAAAAAAAAeY/s1t5Vg74aJw/S220/P1000785.JPG'/></author><thr:total>0</thr:total></entry></feed>
