paperfold
paperfold copied to clipboard
Not working inside the function
i want to do something like this for multiple comments box.
$('.comments_toggle').click(function(){ var target = $(this).data('comment-for'); $('#comment_el_'+target).paperfold().toggle });
Hey Ismail! You have to run the function toggle – e.g. add () at the end:
$('#comment_el_'+target).paperfold.toggle();
If you write it like this it returns the function:
paperfold.toggle
If you write it like this it runs the function:
paperfold.toggle()