I’m using a spry dataset to view data off an .xml file for an online store. There’s your basic stuff, picture link, headline, price, description, item number etc.
The description set can vary as descriptions do with different items I’d like to only show the first few lines (140 characters or something) of the description upon load and then allow the visitor to toggle open the rest of the description. Is there a way to do that? Here is the code I’m currently using, just your basic dreamweaver insert.
my friend gave me this code but doesn’t seem to work:
Show Description
{Item_Last_Name}, {Item_First_Name}
{Item_Code_Number}
{Headline}
{Complete_Description}
{Item_Code_Number}
Retail price: {Retail_Price}
Jquery
$(document).ready(function(){
$('.StackedContainer a').on('click',function(event){
event.preventDefault(); // prevent the link from any action
var thisBtn = $(this); // cache
thisBtn.parent().find('.StackedInner').toggle(); // toggle the description
}); // close on click
})