From e756a7dad303a19dee7ace43551f5bddb83dc41c Mon Sep 17 00:00:00 2001 From: oliveira131 <47257731+oliveira131@users.noreply.github.com> Date: Mon, 22 Jul 2019 21:35:42 -0300 Subject: [PATCH] Update example --- example/index.html | 256 +++++++++++++++++++++++++++------------------ 1 file changed, 152 insertions(+), 104 deletions(-) diff --git a/example/index.html b/example/index.html index 8dd891f..4028cb6 100644 --- a/example/index.html +++ b/example/index.html @@ -1,117 +1,165 @@ - - - - + + + + - - + + + - Toast + Toast - -
- -
- -
- -
- - -
-

My container

-
- - - - - - - + + + + + + function show_random_snack() { + let type = TYPES[Math.floor(Math.random() * TYPES.length)], + content = CONTENT[type].replace('toast', 'snack'); + + $.toast({ + title: content, + type: type, + delay: 5000 + }); + } + + function show_toast_in_container() { + let type = TYPES[Math.floor(Math.random() * TYPES.length)], + title = TITLES[type], + content = CONTENT[type]; + + $.toast({ + title: title, + subtitle: '11 mins ago', + content: content, + type: type, + delay: 5000, + container: $("#my_container") + }); + } +