[web2py] Include control specific data in layout.html header

2020-04-01 Thread Jon Subscripted
Hi everyone,
I'm trying to include view specific data in each view header (it is
actually a GTM datalayer).

I thought the best way to do it was to define a global variable in db.py
and to print a variable  {{=datalayer}}, the each controller will overwrite
it with specific data.

It seems to be working for most of my views, except:
-index.html
-all user.html views (login/register/profile/change_password/etc.)

Any suggestions on how to make it work on index.html and user.html?
What am I doing wrong?
Thanks in advance, Jon.

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
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 web2py+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/CAK8tz33N3JGKwKBtWON3ybUjjFKAZu9qhKK5M7WeC6BVbq5m4Q%40mail.gmail.com.


[web2py] Re: Embed youtube video in markmin (à la web2py book)

2020-04-01 Thread Jon Subscripted
Hi,
any suggestions on how to implement this?
Thanks, Jon.

On Tue, Mar 31, 2020 at 2:00 PM Jon Subscripted 
wrote:

> Hi everyone,
> I have a part of my website shaped as web2py book. In order to handle long
> texts in different languages.
>
> As you might know content is in *.markmin files that are reprocessed into
> HTML to be served by a generic controller.
>
> I'm trying to embed a youtube video in the *.markmin file. I tried the
> following approaches, but none of them worked:
>
> 1) Enter HTML directly:
> https://www.youtube.com/embed/pbIm1R_FBps"; frameborder="0"
> allow="accelerometer; autoplay; encrypted-media; gyroscope;
> picture-in-picture" allowfullscreen>
>
>  2) Use the IFRAME helper:
> {{=IFRAME(_src="https://www.youtube.com/embed/pbIm1R_FBps";)}}
>
>  3) Use the link  wrapped in HTML5 tags directly:
> https://www.youtube.com/embed/pbIm1R_FBps
>
>  4) Use the format from (
> http://fpl.cs.depaul.edu/jriely/360/extras/ractive-web2py/web2py/gluon/contrib/markmin/markmin.html
>  ):
> [[message https://www.youtube.com/embed/pbIm1R_FBps video]]
>
> Option 4, does show a video frame, but then the video does not play o_O
>
> How should I include the link inside the markmin files to make it work?
>
> I know I do not fully understand the mechanics, so most probably there's
> some conceptual error in my implementation.
> Thanks, Jon.
>
> PS. Another way to pose the question would be; what is the IFRAME format
> to be used in *.markmin files inside the web2py book app to embed youtube
> videos?
>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
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 web2py+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/CAK8tz31qjb0Lh3j1eB2mdTV%2BzqAAifrFpN-K35X5cOqA8sKXoA%40mail.gmail.com.


[web2py] Re: Include control specific data in layout.html header

2020-04-01 Thread Jon Subscripted
Hi everyone,
I've just realized what I was doing wrong.

What happened is that I was not returning locals(), but a custom dict,
which was not updated.

Right implementation:

def index():
datalayer = get_datalayer('general','index')
return locals()

Wrong implementation:

def index():
datalayer = get_datalayer('general','index')
return dict(message=T('Welcome to my app!'))


Thanks! Jon.


On Wed, Apr 1, 2020 at 5:59 PM Jon Subscripted 
wrote:

> Hi everyone,
> I'm trying to include view specific data in each view header (it is
> actually a GTM datalayer).
>
> I thought the best way to do it was to define a global variable in db.py
> and to print a variable  {{=datalayer}}, the each controller will overwrite
> it with specific data.
>
> It seems to be working for most of my views, except:
> -index.html
> -all user.html views (login/register/profile/change_password/etc.)
>
> Any suggestions on how to make it work on index.html and user.html?
> What am I doing wrong?
> Thanks in advance, Jon.
>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
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 web2py+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/CAK8tz30a%3Dp47eMR_CXt1q0XN5Exfp_vTb5VV0mO2mu3d0ZVRsQ%40mail.gmail.com.


[web2py] Re: jQuery not working with web2py

2020-04-01 Thread Maurice Waka
Any help on this?
I can't get the code to work with jQuery

{{extend 'layout.html'}}








  


  
 

  
  /*QuickReset*/
 *{margin:0;box-sizing:border-box;} html,body{height:100%;font:14px/1.4 sans
-serif;}


 article {
   height: 150vh;
 }
  





WELCOME (wait 3 sec)
 ABOUT
 OUR WORK
 TESTIMONIALSGoing 
to #contact in 3sec!
 
   CONTACT TO TOP
 


  






 function goTo(selector, timeout, cb) {
 var $el = $(selector);
 if (!$el[0]) return;
 var $par = $el.parent();
 if ($par.is("body")) $par = $("html, body");
 setTimeout(() => {
 $par.stop().animate({scrollTop: $el.offset().top}, 500, cb && cb.call($el[0
]));
 }, timeout || 0);
 }


 // USE LIKE:
 goTo("#testimonials", 3000, function() {
 // You can use `this` to reference #testimonials! yey
 $(this).append("
Going to #contact in 3sec!"); goTo("#contact", 3500); }); // Alternatively, without using callbacks you can do // goTo("#testimonials", 3000); // goTo("#contact", 6000); // Reuse function for elements click! $("[href^='#']").on("click", function(e) { e.preventDefault(); goTo($(this).attr("href")); }); On Wednesday, April 1, 2020 at 4:14:24 AM UTC+3, Maurice Waka wrote: > > I have this code below that works well on the demo site: > http://jsfiddle.net/Lhg914dc/ > > > {{extend 'layout.html'}} > > > > type="text/css"> > > /*QuickReset*/ > *{margin:0;box-sizing:border-box;} html,body{height:100%;font:14px/1.4 > sans-serif;} > > > article { >height: 150vh; > } > > > > > WELCOME (waits 3 sec) > > {{=me}} > {{=work}} > {{=love}} > > CONTACT TO TOP > > > > > https://code.jquery-3.4.1.min.js";> > > > function goTo(selector, timeout, cb) { > var $el = $(selector); > if (!$el[0]) return; > var $par = $el.parent(); > if ($par.is("body")) $par = $("html, body"); > setTimeout(() => { > $par.stop().animate({scrollTop: $el.offset().top}, 1000, cb && cb.call( > $el[0])); > }, timeout || 0); > } > > > // USE LIKE: > goTo("#testimonials", 3000, function() { > // You can use `this` to reference #testimonials! yey > $(this).append("
Going to #contact in 3sec!"); > goTo("#contact", 3000); > }); > // Alternatively, without using callbacks you can do > //goTo("#testimonials", 3000); > > > //goTo("#contact", 6000); > // Reuse function for elements click! > $("[href^='#']").on("click", function(e) { > e.preventDefault(); > goTo($(this).attr("href")); > }); > > > > > > When I try it on web2py I don't see any js/jQuery effects. > > I want to see the page scroll in stages down to specific DIVs, how can I > do this? where could the error be? > > Kind regards > -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- 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 web2py+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/web2py/b78ee0b4-8520-4a4f-89bc-5067e773e1c6%40googlegroups.com.

[web2py] Re: jQuery not working with web2py

2020-04-01 Thread Jim S
What errors are you seeing in your browser console?

-Jim


On Wednesday, April 1, 2020 at 4:56:07 PM UTC-5, Maurice Waka wrote:
>
> Any help on this?
> I can't get the code to work with jQuery
>
> {{extend 'layout.html'}}
>
>
> 
>
>
> 
>
>
>   
>
>
>   
>  
> 
>   
>   /*QuickReset*/
>  *{margin:0;box-sizing:border-box;} html,body{height:100%;font:14px/1.4 
> sans-serif;}
>
>
>  article {
>height: 150vh;
>  }
>   
>
>
>
>
> 
> WELCOME (wait 3 sec) article>
>  ABOUT
>  OUR WORK
>  TESTIMONIALSGoing 
> to #contact in 3sec!
>  
>CONTACT TO TOP
>  
>
>
>"{{=URL('static','js/jquery-1.10.1.js')}}">
>
>
>
>
>
>
>  function goTo(selector, timeout, cb) {
>  var $el = $(selector);
>  if (!$el[0]) return;
>  var $par = $el.parent();
>  if ($par.is("body")) $par = $("html, body");
>  setTimeout(() => {
>  $par.stop().animate({scrollTop: $el.offset().top}, 500, cb && cb.call($el
> [0]));
>  }, timeout || 0);
>  }
>
>
>  // USE LIKE:
>  goTo("#testimonials", 3000, function() {
>  // You can use `this` to reference #testimonials! yey
>  $(this).append("
Going to #contact in 3sec!"); > goTo("#contact", 3500); > }); > // Alternatively, without using callbacks you can do > // goTo("#testimonials", 3000); > // goTo("#contact", 6000); > // Reuse function for elements click! > $("[href^='#']").on("click", function(e) { > e.preventDefault(); > goTo($(this).attr("href")); > }); > > > > > > > > > > > > > On Wednesday, April 1, 2020 at 4:14:24 AM UTC+3, Maurice Waka wrote: >> >> I have this code below that works well on the demo site: >> http://jsfiddle.net/Lhg914dc/ >> >> >> {{extend 'layout.html'}} >> >> >> >> > type="text/css"> >> >> /*QuickReset*/ >> *{margin:0;box-sizing:border-box;} html,body{height:100%;font:14px/1.4 >> sans-serif;} >> >> >> article { >>height: 150vh; >> } >> >> >> >> >> WELCOME (waits 3 sec)> article> >> {{=me}} >> {{=work}} >> {{=love}} >> >> CONTACT TO TOP >> >> >> >> >> https://code.jquery-3.4.1.min.js";> >> >> >> function goTo(selector, timeout, cb) { >> var $el = $(selector); >> if (!$el[0]) return; >> var $par = $el.parent(); >> if ($par.is("body")) $par = $("html, body"); >> setTimeout(() => { >> $par.stop().animate({scrollTop: $el.offset().top}, 1000, cb && cb.call( >> $el[0])); >> }, timeout || 0); >> } >> >> >> // USE LIKE: >> goTo("#testimonials", 3000, function() { >> // You can use `this` to reference #testimonials! yey >> $(this).append("
Going to #contact in 3sec!"); >> goTo("#contact", 3000); >> }); >> // Alternatively, without using callbacks you can do >> //goTo("#testimonials", 3000); >> >> >> //goTo("#contact", 6000); >> // Reuse function for elements click! >> $("[href^='#']").on("click", function(e) { >> e.preventDefault(); >> goTo($(this).attr("href")); >> }); >> >> >> >> >> >> When I try it on web2py I don't see any js/jQuery effects. >> >> I want to see the page scroll in stages down to specific DIVs, how can I >> do this? where could the error be? >> >> Kind regards >> > -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- 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 web2py+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/web2py/7972be54-f400-42f0-83a7-46b7b8fee63f%40googlegroups.com.

Re: [web2py] Re: jQuery not working with web2py

2020-04-01 Thread Maurice Waka
On page reload it should ;
... Slide to testimonials then after 3 seconds
 Slide to contact.

In Web2py nothing happens.
When I do it from the folder it works.
Do the error is that it doesn't slide as normal
Regards

On Thu, Apr 2, 2020, 03:54 Jim S  wrote:

> What errors are you seeing in your browser console?
>
> -Jim
>
>
> On Wednesday, April 1, 2020 at 4:56:07 PM UTC-5, Maurice Waka wrote:
>>
>> Any help on this?
>> I can't get the code to work with jQuery
>>
>> {{extend 'layout.html'}}
>>
>>
>> 
>>
>>
>> 
>>
>>
>>   
>>
>>
>>   
>>
>>
>>   
>>   /*QuickReset*/
>>  *{margin:0;box-sizing:border-box;} html,body{height:100%;font:14px/1.4
>> sans-serif;}
>>
>>
>>  article {
>>height: 150vh;
>>  }
>>   
>>
>>
>>
>>
>> 
>> WELCOME (wait 3 sec)> article>
>>  ABOUT
>>  OUR WORK
>>  TESTIMONIALS
>> Going to #contact in 3sec!
>>  
>>CONTACT TO TOP
>>  
>>
>>
>>   > "{{=URL('static','js/jquery-1.10.1.js')}}">
>>
>>
>>
>>
>>
>>
>>  function goTo(selector, timeout, cb) {
>>  var $el = $(selector);
>>  if (!$el[0]) return;
>>  var $par = $el.parent();
>>  if ($par.is("body")) $par = $("html, body");
>>  setTimeout(() => {
>>  $par.stop().animate({scrollTop: $el.offset().top}, 500, cb && cb.call(
>> $el[0]));
>>  }, timeout || 0);
>>  }
>>
>>
>>  // USE LIKE:
>>  goTo("#testimonials", 3000, function() {
>>  // You can use `this` to reference #testimonials! yey
>>  $(this).append("
Going to #contact in 3sec!"); >> goTo("#contact", 3500); >> }); >> // Alternatively, without using callbacks you can do >> // goTo("#testimonials", 3000); >> // goTo("#contact", 6000); >> // Reuse function for elements click! >> $("[href^='#']").on("click", function(e) { >> e.preventDefault(); >> goTo($(this).attr("href")); >> }); >> >> >> >> >> >> >> >> >> >> >> >> >> On Wednesday, April 1, 2020 at 4:14:24 AM UTC+3, Maurice Waka wrote: >>> >>> I have this code below that works well on the demo site: >>> http://jsfiddle.net/Lhg914dc/ >>> >>> >>> {{extend 'layout.html'}} >>> >>> >>> >>> >> type="text/css"> >>> >>> /*QuickReset*/ >>> *{margin:0;box-sizing:border-box;} html,body{height:100%;font:14px/1.4 >>> sans-serif;} >>> >>> >>> article { >>>height: 150vh; >>> } >>> >>> >>> >>> >>> WELCOME (waits 3 sec)>> article> >>> {{=me}} >>> {{=work}} >>> {{=love}} >>> >>> CONTACT TO TOP >>> >>> >>> >>> >>> https://code.jquery-3.4.1.min.js";> >>> >>> >>> function goTo(selector, timeout, cb) { >>> var $el = $(selector); >>> if (!$el[0]) return; >>> var $par = $el.parent(); >>> if ($par.is("body")) $par = $("html, body"); >>> setTimeout(() => { >>> $par.stop().animate({scrollTop: $el.offset().top}, 1000, cb && cb.call( >>> $el[0])); >>> }, timeout || 0); >>> } >>> >>> >>> // USE LIKE: >>> goTo("#testimonials", 3000, function() { >>> // You can use `this` to reference #testimonials! yey >>> $(this).append("
Going to #contact in 3sec!"); >>> goTo("#contact", 3000); >>> }); >>> // Alternatively, without using callbacks you can do >>> //goTo("#testimonials", 3000); >>> >>> >>> //goTo("#contact", 6000); >>> // Reuse function for elements click! >>> $("[href^='#']").on("click", function(e) { >>> e.preventDefault(); >>> goTo($(this).attr("href")); >>> }); >>> >>> >>> >>> >>> >>> When I try it on web2py I don't see any js/jQuery effects. >>> >>> I want to see the page scroll in stages down to specific DIVs, how can >>> I do this? where could the error be? >>> >>> Kind regards >>> >> -- > Resources: > - http://web2py.com > - http://web2py.com/book (Documentation) > - http://github.com/web2py/web2py (Source code) > - https://code.google.com/p/web2py/issues/list (Report Issues) > --- > You received this message because you are subscribed to a topic in the > Google Groups "web2py-users" group. > To unsubscribe from this topic, visit > https://groups.google.com/d/topic/web2py/AE0mb8FtMM4/unsubscribe. > To unsubscribe from this group and all its topics, send an email to > web2py+unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/web2py/7972be54-f400-42f0-83a7-46b7b8fee63f%40googlegroups.com > > . > -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- 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 web2py+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/web2py/CALkNK55hRxAk%3DkTua3Pi-JC_Ac0ZSS%2BDp6SpSFGsAD4MzAjk9Q%40mail.gmail.com.

Re: [web2py] Re: jQuery not working with web2py

2020-04-01 Thread Jim Steil
But have you looked at the browser JavaScript console to see what it is
telling you?

In Firefox press F12 and then click on the console tab. That will tell you
what JavaScript errors are occurring in the browser.

Jim


On Wed, Apr 1, 2020, 9:35 PM Maurice Waka  wrote:

> On page reload it should ;
> ... Slide to testimonials then after 3 seconds
>  Slide to contact.
>
> In Web2py nothing happens.
> When I do it from the folder it works.
> Do the error is that it doesn't slide as normal
> Regards
>
> On Thu, Apr 2, 2020, 03:54 Jim S  wrote:
>
>> What errors are you seeing in your browser console?
>>
>> -Jim
>>
>>
>> On Wednesday, April 1, 2020 at 4:56:07 PM UTC-5, Maurice Waka wrote:
>>>
>>> Any help on this?
>>> I can't get the code to work with jQuery
>>>
>>> {{extend 'layout.html'}}
>>>
>>>
>>> 
>>>
>>>
>>> 
>>>
>>>
>>>   
>>>
>>>
>>>   
>>>
>>>
>>>   
>>>   /*QuickReset*/
>>>  *{margin:0;box-sizing:border-box;} html,body{height:100%;font:14px/1.4
>>> sans-serif;}
>>>
>>>
>>>  article {
>>>height: 150vh;
>>>  }
>>>   
>>>
>>>
>>>
>>>
>>> 
>>> WELCOME (wait 3 sec)>> article>
>>>  ABOUT
>>>  OUR WORK
>>>  TESTIMONIALS
>>> Going to #contact in 3sec!
>>>  
>>>CONTACT TO TOP
>>>  
>>>
>>>
>>>   >> "{{=URL('static','js/jquery-1.10.1.js')}}">
>>>
>>>
>>>
>>>
>>>
>>>
>>>  function goTo(selector, timeout, cb) {
>>>  var $el = $(selector);
>>>  if (!$el[0]) return;
>>>  var $par = $el.parent();
>>>  if ($par.is("body")) $par = $("html, body");
>>>  setTimeout(() => {
>>>  $par.stop().animate({scrollTop: $el.offset().top}, 500, cb && cb.call(
>>> $el[0]));
>>>  }, timeout || 0);
>>>  }
>>>
>>>
>>>  // USE LIKE:
>>>  goTo("#testimonials", 3000, function() {
>>>  // You can use `this` to reference #testimonials! yey
>>>  $(this).append("
Going to #contact in 3sec!"); >>> goTo("#contact", 3500); >>> }); >>> // Alternatively, without using callbacks you can do >>> // goTo("#testimonials", 3000); >>> // goTo("#contact", 6000); >>> // Reuse function for elements click! >>> $("[href^='#']").on("click", function(e) { >>> e.preventDefault(); >>> goTo($(this).attr("href")); >>> }); >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> On Wednesday, April 1, 2020 at 4:14:24 AM UTC+3, Maurice Waka wrote: I have this code below that works well on the demo site: http://jsfiddle.net/Lhg914dc/ {{extend 'layout.html'}} >>> > >>> type="text/css"> /*QuickReset*/ *{margin:0;box-sizing:border-box;} html,body{height:100%;font:14px/1.4 sans-serif;} article { height: 150vh; } WELCOME (waits 3 sec)>>> article> {{=me}} {{=work}} {{=love}}>>> > CONTACT TO TOP https://code.jquery-3.4.1.min.js";> function goTo(selector, timeout, cb) { var $el = $(selector); if (!$el[0]) return; var $par = $el.parent(); if ($par.is("body")) $par = $("html, body"); setTimeout(() => { $par.stop().animate({scrollTop: $el.offset().top}, 1000, cb && cb.call ($el[0])); }, timeout || 0); } // USE LIKE: goTo("#testimonials", 3000, function() { // You can use `this` to reference #testimonials! yey $(this).append("
Going to #contact in 3sec!"); goTo("#contact", 3000); }); // Alternatively, without using callbacks you can do //goTo("#testimonials", 3000); //goTo("#contact", 6000); // Reuse function for elements click! $("[href^='#']").on("click", function(e) { e.preventDefault(); goTo($(this).attr("href")); }); When I try it on web2py I don't see any js/jQuery effects. I want to see the page scroll in stages down to specific DIVs, how can I do this? where could the error be? Kind regards >>> -- >> Resources: >> - http://web2py.com >> - http://web2py.com/book (Documentation) >> - http://github.com/web2py/web2py (Source code) >> - https://code.google.com/p/web2py/issues/list (Report Issues) >> --- >> You received this message because you are subscribed to a topic in the >> Google Groups "web2py-users" group. >> To unsubscribe from this topic, visit >> https://groups.google.com/d/topic/web2py/AE0mb8FtMM4/unsubscribe. >> To unsubscribe from this group and all its topics, send an email to >> web2py+unsubscr...@googlegroups.com. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/web2py/7972be54-f400-42f0-83a7-46b7b8fee63f%40googlegroups.com >> >> . >> > -- > Resources: > - http://web2py.com > - http://web2py.com/book (Documentation) > - http://github.com/web2py/web2py (Source code) > - https://code.google.com/p/web2py/issues/list (Report Issues)

Re: [web2py] Re: jQuery not working with web2py

2020-04-01 Thread Maurice Waka
I don't have firefox but on opera & chrome it gives this:

web2py-bootstrap3.js:2 Uncaught TypeError: Cannot set property 
'ajax_fields' of undefined
at web2py-bootstrap3.js:2
at web2py-bootstrap3.js:82

On Thursday, April 2, 2020 at 6:17:36 AM UTC+3, Jim S wrote:
>
> But have you looked at the browser JavaScript console to see what it is 
> telling you?
>
> In Firefox press F12 and then click on the console tab. That will tell you 
> what JavaScript errors are occurring in the browser. 
>
> Jim
>
>
> On Wed, Apr 1, 2020, 9:35 PM Maurice Waka  > wrote:
>
>> On page reload it should ;
>> ... Slide to testimonials then after 3 seconds
>>  Slide to contact. 
>>
>> In Web2py nothing happens.
>> When I do it from the folder it works. 
>> Do the error is that it doesn't slide as normal 
>> Regards 
>>
>> On Thu, Apr 2, 2020, 03:54 Jim S > wrote:
>>
>>> What errors are you seeing in your browser console?
>>>
>>> -Jim
>>>
>>>
>>> On Wednesday, April 1, 2020 at 4:56:07 PM UTC-5, Maurice Waka wrote:

 Any help on this?
 I can't get the code to work with jQuery

 {{extend 'layout.html'}}


 


 


   


   
  
 
   
   /*QuickReset*/
  *{margin:0;box-sizing:border-box;} html,body{height:100%;font:14px/1.4 
 sans-serif;}


  article {
height: 150vh;
  }
   




 
 WELCOME (wait 3 sec)>>> article>
  ABOUT
  OUR WORK
  TESTIMONIALS
 Going to #contact in 3sec!
  
CONTACT TO TOP
  


   >>> "{{=URL('static','js/jquery-1.10.1.js')}}">






  function goTo(selector, timeout, cb) {
  var $el = $(selector);
  if (!$el[0]) return;
  var $par = $el.parent();
  if ($par.is("body")) $par = $("html, body");
  setTimeout(() => {
  $par.stop().animate({scrollTop: $el.offset().top}, 500, cb && cb.call(
 $el[0]));
  }, timeout || 0);
  }


  // USE LIKE:
  goTo("#testimonials", 3000, function() {
  // You can use `this` to reference #testimonials! yey
  $(this).append("
Going to #contact in 3sec!"); goTo("#contact", 3500); }); // Alternatively, without using callbacks you can do // goTo("#testimonials", 3000); // goTo("#contact", 6000); // Reuse function for elements click! $("[href^='#']").on("click", function(e) { e.preventDefault(); goTo($(this).attr("href")); }); On Wednesday, April 1, 2020 at 4:14:24 AM UTC+3, Maurice Waka wrote: > > I have this code below that works well on the demo site: > http://jsfiddle.net/Lhg914dc/ > > > {{extend 'layout.html'}} > > > script> > > > > > >
WELCOME (waits 3 sec) article> >
{{=me}}
>
{{=work}}
>
{{=love}} article> > > > > >