<?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/"
	>

<channel>
	<title>Johan de Bruin &#187; mostrar contenido</title>
	<atom:link href="http://www.johandebruin.com/t/mostrar-contenido/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.johandebruin.com</link>
	<description>Programación en php, tutorial de api wordpress y posicionamiento en buscadores seo.</description>
	<lastBuildDate>Sun, 05 Feb 2012 15:18:06 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Mostrar elementos ocultados con javascript</title>
		<link>http://www.johandebruin.com/mostrar-elementos-ocultados-con-javascript/</link>
		<comments>http://www.johandebruin.com/mostrar-elementos-ocultados-con-javascript/#comments</comments>
		<pubDate>Sat, 05 Jun 2010 17:55:26 +0000</pubDate>
		<dc:creator>Johan</dc:creator>
				<category><![CDATA[AJAX]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[mostrar contenido]]></category>
		<category><![CDATA[ocultar contenido]]></category>
		<category><![CDATA[snnipet]]></category>

		<guid isPermaLink="false">http://www.johandebruin.com/?p=593</guid>
		<description><![CDATA[Aquí una rápida pieza de código que permitira ocultar contenido para luego mostrarlo si así lo quiere el usuario. Empleamos javascript junto al reconocimiento DOM de elementos html para definir el contenido de un div. &#60;head&#62; &#60;script type=&#34;text/javascript&#34;&#62; function mostrar() { document.getElementById(&#34;contenedor&#34;).innerHTML = 'hola mundo'; } &#60;/script&#62; &#60;/head&#62; &#60;body&#62; &#60;a href=&#34;javascript://&#34; onclick=&#34;mostrar()&#34;&#62;Mostrar contenido del contenedor&#60;/a&#62; [...]]]></description>
			<content:encoded><![CDATA[<p>Aquí una rápida pieza de código que permitira ocultar contenido para luego mostrarlo si así lo quiere el usuario. Empleamos javascript junto al reconocimiento DOM de elementos html para definir el contenido de un div.</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">&lt;head&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
function mostrar()
{
	document.getElementById(&quot;contenedor&quot;).innerHTML = 'hola mundo';
}
&lt;/script&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;a href=&quot;javascript://&quot; onclick=&quot;mostrar()&quot;&gt;Mostrar contenido del contenedor&lt;/a&gt;
&lt;div id=&quot;contenedor&gt;
&lt;!-- Este contenedo ahora mismo esta vacio --&gt;
&lt;/div&gt;</pre></div></div>

<p><span id="more-593"></span><br />
Y así de facil, únicamente tenemos que hacer referencia con el atributo de onclick a la función que insertara contenido al elemento que queramos mostrar, también sirve para cambiar de imagen, únicamente deberiamos usar el atributo de javascript document.getElementById(&#8220;contenedor&#8221;).src al hacer click a la imagen&#8230; </p>
]]></content:encoded>
			<wfw:commentRss>http://www.johandebruin.com/mostrar-elementos-ocultados-con-javascript/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

