<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Komentarze do: [jQuery] Częściowe rozwijanie i zwijanie tabeli</title>
	<atom:link href="http://websta.pl/tutoriale/jquery-czesciowe-rozwijanie-i-zwijanie-tabeli/feed" rel="self" type="application/rss+xml" />
	<link>http://websta.pl/tutoriale/jquery-czesciowe-rozwijanie-i-zwijanie-tabeli</link>
	<description>Blog o grafice i projektowaniu stron</description>
	<lastBuildDate>Wed, 16 May 2012 22:01:01 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
	<item>
		<title>Autor: kropek4767</title>
		<link>http://websta.pl/tutoriale/jquery-czesciowe-rozwijanie-i-zwijanie-tabeli/comment-page-1#comment-1125</link>
		<dc:creator>kropek4767</dc:creator>
		<pubDate>Sun, 18 Dec 2011 09:57:00 +0000</pubDate>
		<guid isPermaLink="false">http://websta.pl/?p=348#comment-1125</guid>
		<description>z jakiegoś powodu nie dodało kodu odnośnika
&lt;code&gt;&lt;a href=&quot;#&quot; rel=&quot;nofollow&quot;&gt;&lt;/a&gt;&lt;/code&gt;</description>
		<content:encoded><![CDATA[<p>z jakiegoś powodu nie dodało kodu odnośnika<br />
<code><a href="#" rel="nofollow"></a></code></p>
]]></content:encoded>
	</item>
	<item>
		<title>Autor: kropek4767</title>
		<link>http://websta.pl/tutoriale/jquery-czesciowe-rozwijanie-i-zwijanie-tabeli/comment-page-1#comment-1124</link>
		<dc:creator>kropek4767</dc:creator>
		<pubDate>Sun, 18 Dec 2011 09:55:03 +0000</pubDate>
		<guid isPermaLink="false">http://websta.pl/?p=348#comment-1124</guid>
		<description>Mała modyfikacja dla osób które zamaist tekstu &quot;pokaż/ukryj&quot; chciałby użyć ikonek
w pliku css
&lt;code&gt;
a.ikonka {
display: block;
width : 16px;
height : 16px;
float: left;
margin-left: 8px;
background-repeat : no-repeat;
background-position : center;
}
a.pokaz { background-image : url(&#039;../grafika/add.png&#039;); }
a.ukryj { background-image : url(&#039;../grafika/delete.png&#039;); }
&lt;/code&gt;
przycisk &quot;pokaż/ukryj&quot;
&lt;code&gt;
&lt;a href=&quot;#&quot; rel=&quot;nofollow&quot;&gt;&lt;/a&gt;
&lt;/code&gt;
a kod JQurey zmieniamy na
&lt;code&gt;
$(function() {
	var ile = &#039;3&#039;; //ile wierszy pokazać
	$(&#039;.pokaz-ukryj-wiersze tbody tr:nth-child(&#039;+ile+&#039;)&#039;).nextAll().hide();
 
	$(&#039;.przycisk&#039;).toggle(function(){
		$(this).parent().parent().find(&#039;.pokaz-ukryj-wiersze tbody tr:nth-child(&#039;+ile+&#039;)&#039;).nextAll().show();
		$(this).removeClass(&quot;pokaz noClass&quot;).addClass(&quot;ukryj&quot;);  
		return false;
	},
	function(){	
		$(this).parent().parent().find(&#039;.pokaz-ukryj-wiersze tbody tr:nth-child(&#039;+ile+&#039;)&#039;).nextAll().hide();
		$(this).removeClass(&quot;ukryj noClass&quot;).addClass(&quot;pokaz&quot;);;
		return false;
	});
});&lt;/code&gt;</description>
		<content:encoded><![CDATA[<p>Mała modyfikacja dla osób które zamaist tekstu &#8222;pokaż/ukryj&#8221; chciałby użyć ikonek<br />
w pliku css<br />
<code><br />
a.ikonka {<br />
display: block;<br />
width : 16px;<br />
height : 16px;<br />
float: left;<br />
margin-left: 8px;<br />
background-repeat : no-repeat;<br />
background-position : center;<br />
}<br />
a.pokaz { background-image : url('../grafika/add.png'); }<br />
a.ukryj { background-image : url('../grafika/delete.png'); }<br />
</code><br />
przycisk &#8222;pokaż/ukryj&#8221;<br />
<code><br />
<a href="#" rel="nofollow"></a><br />
</code><br />
a kod JQurey zmieniamy na<br />
<code><br />
$(function() {<br />
	var ile = '3'; //ile wierszy pokazać<br />
	$('.pokaz-ukryj-wiersze tbody tr:nth-child('+ile+')').nextAll().hide();</p>
<p>	$('.przycisk').toggle(function(){<br />
		$(this).parent().parent().find('.pokaz-ukryj-wiersze tbody tr:nth-child('+ile+')').nextAll().show();<br />
		$(this).removeClass("pokaz noClass").addClass("ukryj");<br />
		return false;<br />
	},<br />
	function(){<br />
		$(this).parent().parent().find('.pokaz-ukryj-wiersze tbody tr:nth-child('+ile+')').nextAll().hide();<br />
		$(this).removeClass("ukryj noClass").addClass("pokaz");;<br />
		return false;<br />
	});<br />
});</code></p>
]]></content:encoded>
	</item>
	<item>
		<title>Autor: Mikołaj</title>
		<link>http://websta.pl/tutoriale/jquery-czesciowe-rozwijanie-i-zwijanie-tabeli/comment-page-1#comment-710</link>
		<dc:creator>Mikołaj</dc:creator>
		<pubDate>Thu, 24 Nov 2011 18:39:20 +0000</pubDate>
		<guid isPermaLink="false">http://websta.pl/?p=348#comment-710</guid>
		<description>Witam, niestety nie znam java scriptu a chciałbym zamiast zwiń/ rozwiń - obrazki. Czy mogę prosić o rozwiązanie jak się wstawia obrazki w js? zamiast text(&quot;    &quot;)</description>
		<content:encoded><![CDATA[<p>Witam, niestety nie znam java scriptu a chciałbym zamiast zwiń/ rozwiń &#8211; obrazki. Czy mogę prosić o rozwiązanie jak się wstawia obrazki w js? zamiast text(&#8221;    &#8222;)</p>
]]></content:encoded>
	</item>
	<item>
		<title>Autor: Websta</title>
		<link>http://websta.pl/tutoriale/jquery-czesciowe-rozwijanie-i-zwijanie-tabeli/comment-page-1#comment-61</link>
		<dc:creator>Websta</dc:creator>
		<pubDate>Fri, 04 Dec 2009 15:11:54 +0000</pubDate>
		<guid isPermaLink="false">http://websta.pl/?p=348#comment-61</guid>
		<description>To jest tylko prosty sposób na to co widać. Jeśli dobrze rozumiem, chodzi Ci o coś zupełnie innego i z użyciem Ajax-a. Ten skrypt robi jedynie prostą operację na HTML w przeglądarce.</description>
		<content:encoded><![CDATA[<p>To jest tylko prosty sposób na to co widać. Jeśli dobrze rozumiem, chodzi Ci o coś zupełnie innego i z użyciem Ajax-a. Ten skrypt robi jedynie prostą operację na HTML w przeglądarce.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Autor: Websta</title>
		<link>http://websta.pl/tutoriale/jquery-czesciowe-rozwijanie-i-zwijanie-tabeli/comment-page-1#comment-60</link>
		<dc:creator>Websta</dc:creator>
		<pubDate>Fri, 04 Dec 2009 15:08:58 +0000</pubDate>
		<guid isPermaLink="false">http://websta.pl/?p=348#comment-60</guid>
		<description>Trudno powiedzieć. Strzelam, że to sprawa CSS</description>
		<content:encoded><![CDATA[<p>Trudno powiedzieć. Strzelam, że to sprawa CSS</p>
]]></content:encoded>
	</item>
	<item>
		<title>Autor: Aziz</title>
		<link>http://websta.pl/tutoriale/jquery-czesciowe-rozwijanie-i-zwijanie-tabeli/comment-page-1#comment-59</link>
		<dc:creator>Aziz</dc:creator>
		<pubDate>Wed, 02 Dec 2009 16:54:45 +0000</pubDate>
		<guid isPermaLink="false">http://websta.pl/?p=348#comment-59</guid>
		<description>Witam,

Czy można użyć tego scryptu jQuery z mySQL i PHP tak by widoczna była jedna tabela a każdy rozwijany rząd pobierał i wyświetlał dane z drugiej tabeli?</description>
		<content:encoded><![CDATA[<p>Witam,</p>
<p>Czy można użyć tego scryptu jQuery z mySQL i PHP tak by widoczna była jedna tabela a każdy rozwijany rząd pobierał i wyświetlał dane z drugiej tabeli?</p>
]]></content:encoded>
	</item>
	<item>
		<title>Autor: Artur</title>
		<link>http://websta.pl/tutoriale/jquery-czesciowe-rozwijanie-i-zwijanie-tabeli/comment-page-1#comment-58</link>
		<dc:creator>Artur</dc:creator>
		<pubDate>Mon, 23 Nov 2009 21:19:43 +0000</pubDate>
		<guid isPermaLink="false">http://websta.pl/?p=348#comment-58</guid>
		<description>Witam,
mogę prosić o pomoc w umieszczeniu tego skryptu w zagnieżdżonej tabeli.
Jak wstawiam ten skrypt do tabeli w tabeli, to rozwiń przeskakuje mi poza tabele.</description>
		<content:encoded><![CDATA[<p>Witam,<br />
mogę prosić o pomoc w umieszczeniu tego skryptu w zagnieżdżonej tabeli.<br />
Jak wstawiam ten skrypt do tabeli w tabeli, to rozwiń przeskakuje mi poza tabele.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Autor: Websta</title>
		<link>http://websta.pl/tutoriale/jquery-czesciowe-rozwijanie-i-zwijanie-tabeli/comment-page-1#comment-30</link>
		<dc:creator>Websta</dc:creator>
		<pubDate>Sat, 19 Sep 2009 23:29:42 +0000</pubDate>
		<guid isPermaLink="false">http://websta.pl/?p=348#comment-30</guid>
		<description>Na początek zmień tabelą id=&quot;zwijana&quot; na class=&quot;zwijana&quot;
Następnie każdą tabelę i jej przycisk zamknij w osobny div
&lt;pre lang=&quot;html4strict&quot;&gt;
&lt;div&gt;
&lt;table class=&quot;zwijana&quot; cellspacing=&quot;0&quot; &gt;
...
&lt;/table&gt;
&lt;p&gt;&lt;a href=&quot;#&quot; class=&quot;przycisk&quot; rel=&quot;nofollow&quot;&gt;rozwiń&lt;/a&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;table class=&quot;zwijana&quot; cellspacing=&quot;0&quot; &gt;
...
&lt;/table&gt;
&lt;p&gt;&lt;a href=&quot;#&quot; class=&quot;przycisk&quot; rel=&quot;nofollow&quot;&gt;rozwiń&lt;/a&gt;&lt;/p&gt;
&lt;/div&gt;
itd...
&lt;/pre&gt;
A kod jQuery zmień na:
&lt;pre lang=&quot;javascript&quot;&gt;
$(function() {
	var ile = &#039;3&#039;; //ile wierszy pokazać
	$(&#039;.zwijana tbody tr:nth-child(&#039;+ile+&#039;)&#039;).nextAll().hide();
			
	$(&#039;.przycisk&#039;).toggle(function(){
		$(this).parent().parent().find(&#039;.zwijana tbody tr:nth-child(&#039;+ile+&#039;)&#039;).nextAll().show();
		$(this).text(&quot;rozwiń&quot;);  
		return false;
	},
	function(){	
		$(this).parent().parent().find(&#039;.zwijana tbody tr:nth-child(&#039;+ile+&#039;)&#039;).nextAll().hide();
		$(this).text(&quot;zwiń&quot;);
		return false;
	});
});
&lt;/pre&gt;
Może mało eleganckie, ale działa.</description>
		<content:encoded><![CDATA[<p>Na początek zmień tabelą id=&#8221;zwijana&#8221; na class=&#8221;zwijana&#8221;<br />
Następnie każdą tabelę i jej przycisk zamknij w osobny div</p>

<div class="wp_syntax"><div class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">div</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">table</span> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;zwijana&quot;</span> <span style="color: #000066;">cellspacing</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;0&quot;</span> &gt;</span>
...
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">table</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">p</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">a</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;#&quot;</span> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;przycisk&quot;</span> <span style="color: #000066;">rel</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;nofollow&quot;</span>&gt;</span>rozwiń<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">a</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">p</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">div</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">div</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">table</span> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;zwijana&quot;</span> <span style="color: #000066;">cellspacing</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;0&quot;</span> &gt;</span>
...
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">table</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">p</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">a</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;#&quot;</span> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;przycisk&quot;</span> <span style="color: #000066;">rel</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;nofollow&quot;</span>&gt;</span>rozwiń<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">a</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">p</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">div</span>&gt;</span>
itd...</pre></div></div>

<p>A kod jQuery zmień na:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">$<span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	<span style="color: #003366; font-weight: bold;">var</span> ile <span style="color: #339933;">=</span> <span style="color: #3366CC;">'3'</span><span style="color: #339933;">;</span> <span style="color: #006600; font-style: italic;">//ile wierszy pokazać</span>
	$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'.zwijana tbody tr:nth-child('</span><span style="color: #339933;">+</span>ile<span style="color: #339933;">+</span><span style="color: #3366CC;">')'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">nextAll</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">hide</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
	$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'.przycisk'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">toggle</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
		$<span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">this</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">parent</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">parent</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">find</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'.zwijana tbody tr:nth-child('</span><span style="color: #339933;">+</span>ile<span style="color: #339933;">+</span><span style="color: #3366CC;">')'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">nextAll</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">show</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		$<span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">this</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">text</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;rozwiń&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>  
		<span style="color: #000066; font-weight: bold;">return</span> <span style="color: #003366; font-weight: bold;">false</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span>
	<span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>	
		$<span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">this</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">parent</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">parent</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">find</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'.zwijana tbody tr:nth-child('</span><span style="color: #339933;">+</span>ile<span style="color: #339933;">+</span><span style="color: #3366CC;">')'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">nextAll</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">hide</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		$<span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">this</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">text</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;zwiń&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #000066; font-weight: bold;">return</span> <span style="color: #003366; font-weight: bold;">false</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>Może mało eleganckie, ale działa.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Autor: ggracz</title>
		<link>http://websta.pl/tutoriale/jquery-czesciowe-rozwijanie-i-zwijanie-tabeli/comment-page-1#comment-27</link>
		<dc:creator>ggracz</dc:creator>
		<pubDate>Sat, 19 Sep 2009 21:46:43 +0000</pubDate>
		<guid isPermaLink="false">http://websta.pl/?p=348#comment-27</guid>
		<description>Witam!
zrobiłem wszytko zgodnie z tutem... i ogółem wszytko mi ładnie działa... z tym że chce dać więcej niż jedną tabele na stronę... i teraz jak mam te 2 tabele.. to nie ważne w które &quot;rozwiń&quot; klikam to mi rozwija obie te tabele.. a ja chciałbym tak żeby rozwijało tylko jedną, da się tak zrobić?</description>
		<content:encoded><![CDATA[<p>Witam!<br />
zrobiłem wszytko zgodnie z tutem&#8230; i ogółem wszytko mi ładnie działa&#8230; z tym że chce dać więcej niż jedną tabele na stronę&#8230; i teraz jak mam te 2 tabele.. to nie ważne w które &#8222;rozwiń&#8221; klikam to mi rozwija obie te tabele.. a ja chciałbym tak żeby rozwijało tylko jedną, da się tak zrobić?</p>
]]></content:encoded>
	</item>
</channel>
</rss>

