Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
#1 2014-01-31 09:09:32
- matteo
- Member
- Registered: 2013-12-19
- Posts: 26
Excerpt of article's thumbnail
I have a series of thumbnail about articles.
Of these I would like to show the excerpt one by one at the hover of mouse in single image.
The javascript code is ok but i see all excerpt.
Is possible limit the wiew of excerpt on the single article?
Thanks.
Matteo
Offline
Re: Excerpt of article's thumbnail
Can you post the code you’re using to get what you have so far?
Offline
#3 2014-01-31 10:53:27
- matteo
- Member
- Registered: 2013-12-19
- Posts: 26
Re: Excerpt of article's thumbnail
<txp:article_custom section='ricette' status="live" limit="6">
<txp:permlink>
<!-- Title and classes -->
<span class="title"><txp:title /></span>
<div class="contenitore-immagine">
<txp:images>
<txp:smd_thumbnail type="ricette" />
</txp:images>
<div class="flyout hidden">
<i class="fa fa-clock-o"><span class="info-ricette">
<txp:excerpt />
</span></i>
</div>
</div>
</txp:permlink>
</txp:article_custom>
{Edited to add Textile’s bc..
for straightening quotes. – Uli}
Last edited by uli (2014-01-31 11:00:53)
Offline
#4 2014-01-31 10:59:30
- uli
- Moderator
- From: Cologne
- Registered: 2006-08-15
- Posts: 4,315
Re: Excerpt of article's thumbnail
I see yet another way of interpreting your issue: You want only a portion of the excerpt displayed. If so, look for the plugin rss_auto_excerpt and its countless possibilities and replace your excerpt tag with it.
In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links
Offline
Re: Excerpt of article's thumbnail
Or are you saying your javascript is displaying the excerpts for all 6 articles? If so we need to see the script as it is probably showing all content in the flyout class.
Piwik Dashboard, Google Analytics Dashboard, Minibar, Article Image Colorpicker, Admin Datepicker, Admin Google Map, Admin Colorpicker
Offline
#6 2014-01-31 16:40:04
- matteo
- Member
- Registered: 2013-12-19
- Posts: 26
Re: Excerpt of article's thumbnail
$(“div.contenitore-immagine”).hover(function(){
$(‘flyout’).slideToggle();
});
The problem is that show all content in the flyout class ?
Offline
Re: Excerpt of article's thumbnail
As I suspected that is what you’re JavaScript is telling it to do. For every div that has a class of contenitore-immagine, when hovering display everything that has a class of flyout. I think you only want children nodes that have flyout.
Try this (untested):
$("div.contenitore-immagine").hover(function(){
this.find('.flyout').slideToggle();
});
Last edited by MattD (2014-01-31 22:50:54)
Piwik Dashboard, Google Analytics Dashboard, Minibar, Article Image Colorpicker, Admin Datepicker, Admin Google Map, Admin Colorpicker
Offline
#8 2014-02-03 11:21:30
- matteo
- Member
- Registered: 2013-12-19
- Posts: 26
Re: Excerpt of article's thumbnail
Thank you. :)
With $(this).find I solved the problem!
Offline
Pages: 1