Note that there are some explanatory texts on larger screens.

plurals
  1. POjQuery toggle elements with class in parent div only
    primarykey
    data
    text
    <p>I've been beating my head against my desk for the last two days over this one. I'm making an app that displays info from a db, the title/link, thumbnail, and time saved wrapped in an unordered list, like so: <a href="http://blog.madebycraig.com/images/full.jpg" rel="nofollow noreferrer">http://blog.madebycraig.com/images/full.jpg</a><br /> What I'm trying to do is have a minimize button on the element, toggling the thumbnail and time saved on and off: <a href="http://blog.madebycraig.com/images/minimized.jpg" rel="nofollow noreferrer">http://blog.madebycraig.com/images/minimized.jpg</a><br /> I can accomplish this, but it's all or nothing. I click one minimize button, and everything goes. How can I contain it to just toggle items with a certain class name that are children of the div that the minimize button is in? I've tried .parent(), .child(), .next(), .prev(). I've thrown everything at it that I know. Now I turn to you, kind sirs (or madams). What am I doing wrong? Here's the ul I'm trying to run it on.</p> <pre><code>echo' &lt;li class="bookmarkContainer"&gt; &lt;a href="'.$row['url'].'" class="toggle"&gt;&lt;img class="thumb" src="images/placeholder.png" /&gt;&lt;/a&gt; &lt;div class="title"&gt;&lt;a href="'.$row['url'].'" class="bookmrk" target="_blank"&gt;'.$row['title'].'&lt;/a&gt;&lt;/div&gt; &lt;div class="dt toggle"&gt;'.relativeTime($row['dt']).'&lt;/div&gt;&lt;br /&gt; &lt;a class="collapse" href="#"&gt;hide&lt;/a&gt; &lt;a class="delete" href="?delete='.$row['id'].'" id="'.$row['id'].'"&gt;Delete Bookmark&lt;/a&gt; &lt;/li&gt;'; </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload