paperfold icon indicating copy to clipboard operation
paperfold copied to clipboard

Not working inside the function

Open ghost opened this issue 10 years ago • 1 comments

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 });

ghost avatar Dec 21 '15 11:12 ghost

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()

mrflix avatar Mar 10 '16 10:03 mrflix