in your css
span.spoiler {
display: none
}
in your html
<p>if you want to see it click <a class="spoiler_toggler" href="#" data-show
="#spoiler_1">here</a></p> <span id="spoiler_1">the spoiler is here</span>
in your js
$('a.spoiler_toggler').on('click', function(e) {
e.preventDefault();
var spoiler_to_reveal = $(this).data('show');
$(spoiler_to_reveal).show();
})
?
Untested but should work.
On Wednesday, April 3, 2013 10:08:35 PM UTC+2, BlueShadow wrote:
>
> Hi,
> I would love to add a funktion to my app where I can hide some content.
> This content should become visibleafter clicking some button. The catch is
> I don't want to reload the page.
> how would you approach this problem. (adding a spoiler tag to my content
> and parsing the text for it is not the problem).
>
> Thanks for the help
>
--
---
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.