-
Notifications
You must be signed in to change notification settings - Fork 20
Open
Description
Hi,
I am trying to define 2 shortcode classes, the second one uses content generated by the first one.
I guess I have to refresh the DOM after the first class has been called, but I can't get it to work.
Here is my code 👍
$('#content-wrapper').shortcode({
accordions: function(done) {
//var $html = $($('this').html());
var $text = "<div class='accordion'><ul class='resp-tabs-list'></ul><div class='resp-tabs-container'></div>";
/* setTimeout is used here to simulate an async event */
setTimeout(function() {
done($text);
}, 1000);
//return $text;
},
accordion: function(done) {
var $text = "<i class='icon-info-sign'></i>" + this.options.title;
var $toc = $($('.resp-tabs-list').html());
$toc.find('ul').append(
$('<li>'), {
text: $text
});
return $toc;
}); Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels