Jump to content


Photo
- - - - -

display content with delay ...?


  • Please log in to reply
6 replies to this topic

#1 julius

julius

    Advanced Member

  • Members
  • 45 posts
  • LocationItaly (Bolzano)
  • Framework Version:DMS
  • Country: Country Flag

Posted 07 September 2013 - 05:09 PM

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

http://stanislav.it/...ent-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 :-) ?



#2 Danny

Danny

    Is Awesome!

  • Moderators
  • 17945 posts
  • LocationManchester, UK
  • Country: Country Flag

Posted 08 September 2013 - 08:05 AM

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.



#3 julius

julius

    Advanced Member

  • Members
  • 45 posts
  • LocationItaly (Bolzano)
  • Framework Version:DMS
  • Country: Country Flag

Posted 09 September 2013 - 07:11 AM

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?



#4 Danny

Danny

    Is Awesome!

  • Moderators
  • 17945 posts
  • LocationManchester, UK
  • Country: Country Flag

Posted 09 September 2013 - 10:16 AM

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.

#5 stanislav.it

stanislav.it

    Newbie

  • Members
  • Pip
  • 1 posts

Posted 09 September 2013 - 10:24 AM

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


  • Danny likes this

#6 julius

julius

    Advanced Member

  • Members
  • 45 posts
  • LocationItaly (Bolzano)
  • Framework Version:DMS
  • Country: Country Flag

Posted 09 September 2013 - 10:27 AM

Awesome Stan, cool thing!

:-)

 

I write you a PN on you website right now



#7 julius

julius

    Advanced Member

  • Members
  • 45 posts
  • LocationItaly (Bolzano)
  • Framework Version:DMS
  • Country: Country Flag

Posted 09 September 2013 - 12:42 PM

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!