javascript delay on container

javascript delay on container

  

any one know javascript for delay in onclick of this container?

Hi Erron,

Can you tell me your use case, exactly what are you trying to do, normally javascript onclick on any object will not delay, delay is based on the opertion what its was doing inside the event,

Are you using any javascript third party libraries?


Thanks,
Balu

Hi, Can you try this piece of code and let me know.


$("button").click(
    function() {
        console.log("clicked...waiting...");

        setTimeout(
            function() {
                alert("Called after delay.");
            },
            5000);
    });

Pankaj pant wrote:

Hi, Can you try this piece of code and let me know.


$("button").click(
    function() {
        console.log("clicked...waiting...");

        setTimeout(
            function() {
                alert("Called after delay.");
            },
            5000);
    });

still didn't work for me 


Hi Erron Lolha,


Do you want to achieve something like this... (click the pink magic container)

Actually, I am not able to understand your requirement.


Regards,

Benjith

Benjith Sam wrote:

Hi Erron Lolha,


Do you want to achieve something like this... (click the pink magic container)

Actually, I am not able to understand your requirement.


Regards,

Benjith


yeah something like that

Solution

Hi Erron Lolha,


This is how I did...


1) Container Properties with onClick action


2) Screen level javaScript definition

3) Container OnClick action flow


Hope it helps you!

Let me know if you have any questions!


Regards,

Benjith Sam

Solution

Benjith Sam wrote:

Hi Erron Lolha,


This is how I did...


1) Container Properties with onClick action


2) Screen level javaScript definition

3) Container OnClick action flow


Hope it helps you!

Let me know if you have any questions!


Regards,

Benjith Sam

i've another question, how to add scroll bar in this area?

Hi Erron Lolha,

To have a scroll bar within the container. Just include the code mentioned below in the extended style:

SyntaxEditor Code Snippet

overflow-y: scroll;
max-height: 100px;



Hope it helps.


Regards,

Benjith Sam

Benjith Sam 

i've already try it before but it didn't work. i use it in mobile dropdown 

Thank you for good idea. I can applied to use in next time.


ufabet : po