<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	
	xmlns:georss="http://www.georss.org/georss"
	xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#"
	>

<channel>
	<title>responsive Archives - Michael Sunarlim</title>
	<atom:link href="https://sunarlim.com/tag/responsive/feed/" rel="self" type="application/rss+xml" />
	<link>https://sunarlim.com/tag/responsive/</link>
	<description>Random blurbs about web development, e-commerce and technology</description>
	<lastBuildDate>Wed, 27 Jan 2016 08:04:41 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.4.5</generator>

<image>
	<url>https://i0.wp.com/sunarlim.com/wp-content/uploads/2016/07/cropped-MS_Square_512x512.png?fit=32%2C32&#038;ssl=1</url>
	<title>responsive Archives - Michael Sunarlim</title>
	<link>https://sunarlim.com/tag/responsive/</link>
	<width>32</width>
	<height>32</height>
</image> 
<site xmlns="com-wordpress:feed-additions:1">30613895</site>	<item>
		<title>Latest project: House of Kooser</title>
		<link>https://sunarlim.com/2015/08/latest-project-house-of-kooser/</link>
					<comments>https://sunarlim.com/2015/08/latest-project-house-of-kooser/#respond</comments>
		
		<dc:creator><![CDATA[Michael]]></dc:creator>
		<pubDate>Fri, 14 Aug 2015 05:43:15 +0000</pubDate>
				<category><![CDATA[CMS]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[html5]]></category>
		<category><![CDATA[kirby]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[responsive]]></category>
		<guid isPermaLink="false">https://sunarlim.com/?p=1523</guid>

					<description><![CDATA[<p>It had been a while since I worked on fully customized website without using a pre-built templates. Doing <a href="http://houseofkooser.com/" target="_blank">House of Kooser's new website</a> has been a refreshing experience. While it certainly took more time, there is this different level of satisfaction once you see up and running.</p>
<p>The post <a href="https://sunarlim.com/2015/08/latest-project-house-of-kooser/">Latest project: House of Kooser</a> appeared first on <a href="https://sunarlim.com">Michael Sunarlim</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>It had been a while since I fully worked on a customized website without using pre-built templates. Doing <a href="http://houseofkooser.com/" target="_blank">House of Kooser&#8217;s new website</a> has been a refreshing experience. While it certainly took more time, there is this different level of satisfaction once you see it up and running.</p>
<p>On top of it, the site is integrated with the always awesome <a href="http://getkirby.com/" target="_blank">Kirby CMS</a>.</p>
<p>Check it out at <a href="http://houseofkooser.com/" target="_blank">houseofkooser.com</a></p>
<p>The post <a href="https://sunarlim.com/2015/08/latest-project-house-of-kooser/">Latest project: House of Kooser</a> appeared first on <a href="https://sunarlim.com">Michael Sunarlim</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://sunarlim.com/2015/08/latest-project-house-of-kooser/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">1523</post-id>	</item>
		<item>
		<title>Responsive Multi-level Menu to Dropdown</title>
		<link>https://sunarlim.com/2013/02/responsive-multi-level-menu-to-dropdown/</link>
					<comments>https://sunarlim.com/2013/02/responsive-multi-level-menu-to-dropdown/#respond</comments>
		
		<dc:creator><![CDATA[Michael]]></dc:creator>
		<pubDate>Wed, 27 Feb 2013 07:45:30 +0000</pubDate>
				<category><![CDATA[jQuery]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[navigation]]></category>
		<category><![CDATA[responsive]]></category>
		<guid isPermaLink="false">https://sunarlim.com/?p=728</guid>

					<description><![CDATA[<p>Thanks to this excellent tutorial from CSS-Tricks explaining how to create list-based menu into select dropdown on small screens, I was able to finally complete the product detail pages on Bluelounge website. My homework was not finished though. With around 20 active products on the website, I needed to preserve the product categories within the... <span class="more"><a class="more-link" href="https://sunarlim.com/2013/02/responsive-multi-level-menu-to-dropdown/">Continue reading <span class="meta-nav">&#8594;</span></a></span></p>
<p>The post <a href="https://sunarlim.com/2013/02/responsive-multi-level-menu-to-dropdown/">Responsive Multi-level Menu to Dropdown</a> appeared first on <a href="https://sunarlim.com">Michael Sunarlim</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Thanks to <a href="http://css-tricks.com/convert-menu-to-dropdown/" target="_blank">this excellent tutorial from CSS-Tricks</a> explaining how to create list-based menu into select dropdown on small screens, I was able to finally complete the product detail pages on <a href="http://www.bluelounge.com/" target="_blank">Bluelounge website</a>. My homework was not finished though. With around 20 active products on the website, I needed to preserve the product categories within the dropdown menu to make it easier for visitors to check out other products. With some adjustments and a few extra lines of codes, it now works the way I wanted.<br />
<span id="more-728"></span></p>
<h3>Reading Requirement</h3>
<p>Before I begin, please first read the tutorial from CSS-Tricks to understand the initial concept: <a href="http://css-tricks.com/convert-menu-to-dropdown/" target="_blank">Convert a Menu to a Dropdown for Small Screens</a></p>
<h3>The HTML</h3>
<p>Here is the simplified HTML I use for the navigation:</p>
<pre class="lang:default decode:true ">&lt;ul id="list-products"&gt;
&lt;li class="category"&gt;&lt;h3&gt;Cable Management&lt;/h3&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="/products/sumo/"&gt;Sumo&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="/products/cableboxmini/"&gt;CableBox Mini&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="/products/cableclip/" &gt;CableClip&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="/products/cabledrop/"&gt;CableDrop&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="/products/cablebox/"&gt;CableBox&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="/products/cableyoyo/"&gt;Cableyoyo&lt;/a&gt;&lt;/li&gt;
&lt;li class="category"&gt;&lt;h3&gt;Stands&lt;/h3&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="/products/mika/"&gt;Mika&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="/products/milo/"&gt;Milo&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="/products/nest/"&gt;Nest&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="/products/notebookkit/"&gt;Notebook Kit&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="/products/coolfeet/"&gt;Cool Feet&lt;/a&gt;&lt;/li&gt;
&lt;li class="category"&gt;&lt;h3&gt;Chargers&lt;/h3&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="/products/minidock/"&gt;MiniDock&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="/products/refresh/"&gt;Refresh&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="/products/extraconnectors/"&gt;Extra Connectors&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="/products/thesanctuary/"&gt;The Sanctuary&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</pre>
<p>I use <span class="lang:default decode:true crayon-inline ">class=&#8221;category&#8221;</span>  and <span class="lang:default decode:true crayon-inline ">&lt;h3&gt;&lt;/h3&gt;</span>  for list items that are categories. Since we do not have a category page, the list items do not have a link.</p>
<h3>jQuery</h3>
<p>The fun part was to modify the original code to only create dropdown options from list items with <code>class="category"</code> and then list the following option with the URL as value until it finds the next category title.<br />
Another code I added was to validate when changed if it has a (URL) value, otherwise it will not change the page.</p>
<pre class="lang:default decode:true">// Create the dropdown base
$("&lt;select /&gt;").appendTo(".productlist ");

// Create default option "Products."
$("&lt;option /&gt;", {
"selected": "selected",
"value" : "",
"text" : "Products"
}).appendTo(".productlist select");

// Populate dropdown with menu items
$(".productlist .category").each(function() { // List category titles
var el = $(this);
$("&lt;option /&gt;", {
"text" : el.text(),
"class" : "category" // Add class to the menu item
}).appendTo(".productlist select");
// Look for next items until there it finds another category title
$(this).nextUntil(".productlist .category").each(function() {
var li = $('a', this);
$("&lt;option /&gt;", {
"value" : li.attr("href"),
"text" : '- '+li.text()
}).appendTo(".productlist select");
});
});</pre>
<p>Done. For real-life example, you can view it on <a href="http://www.bluelounge.com/products/studiodesk" target="_blank">Bluelounge product page</a>.</p>
<p>The post <a href="https://sunarlim.com/2013/02/responsive-multi-level-menu-to-dropdown/">Responsive Multi-level Menu to Dropdown</a> appeared first on <a href="https://sunarlim.com">Michael Sunarlim</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://sunarlim.com/2013/02/responsive-multi-level-menu-to-dropdown/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">728</post-id>	</item>
	</channel>
</rss>
