Jump to content

Archived

This topic is now archived and is closed to further replies.

julius

display content with delay ...?

Recommended Posts

julius    4
julius

Found this post about one possibility of displaying content with delay...

http://stanislav.it/javascript-display-content-with-delay/

and since I am NOT a coder (javascript, php zero...) I want to ask you for a feedback:

 

I would like to display the pricing section on a page with 100 seconds delay.

Is there a simple way to do that (with the custom code area in DMS)? 

And if yes, can anybody share a code for it :-) ?

Share this post


Link to post
Share on other sites
Danny    1,327
Danny

Hi,

 

You could try adding a custom class to the ProPricing section and then add the JS to your custom scripts. In the example JS provided on that site, replace my-class, with the class you added to the ProPricing sections Styling Classes field.


Please search our forums, before posting!

Share this post


Link to post
Share on other sites
julius    4
julius

hmmm thanx,

I tried this code:

 

<script>
$(document).ready(function() {
$('.my-class').hide();
$('.my-class').delay(1000).fadeIn(500);
});
</script>

 

but ist did not work for me.

I replaced my-class with the custom class I added -

must I also replace the (document) and (function) with something?

Share this post


Link to post
Share on other sites
Danny    1,327
Danny
I would contact the creator of the code for assistance. Javascript isn't my forte, the author of the code will be able to assist you better than we can.

Please search our forums, before posting!

Share this post


Link to post
Share on other sites
stanislav.it    1
stanislav.it

Hello julius, 

 

I am the author of the code and I just saw the backlink to my article. How can I help you? Can you provide me more information about what are you trying to achieve and URL to your website as well : )

 

Greetings,

Stan

  • Like 1

Share this post


Link to post
Share on other sites
julius    4
julius

Awesome Stan, cool thing!

:-)

 

I write you a PN on you website right now

Share this post


Link to post
Share on other sites
julius    4
julius

With this JS code finally it works for me to display content with delay in DMS

(add to custom scripts):

 

<script type='text/javascript' src='http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js'></script>

 

<script>

$(document).ready(function() {

$('.my-class').hide();

$('.my-class').delay(10000).fadeIn(2000);

});

</script>

 

Just replace "my-class" with the custom class you assigned to the section you want to display with delay

(typical use is for the pricing section on a video sales page)

Delay and fadeIn are measured in milliseconds,

so in this case delay(10000) is a 10 seconds delay.

Big thanx again to Stan (http://stanislav.it/) for the support! :goodjob:

 

UPDATE: hmmm after trying it on another site,

it seems that there is a conflict with the DMS toolbar...

if anyone else tries this code here, please post!

Share this post


Link to post
Share on other sites

×