My buttons class: button-stg
My script:
$(document).ready(function(){ $(".button-stg").click(function(event) { event.preventDefault(); $.ajax($(this).attr('href')).done(function(response) { }); }); });
How do I add this script if I would like to create a popup or dialog containing "Random Text" that disappears after 3 seconds?
Use jquery .fadeOut()
.fadeOut()
$('.popup').fadeOut(3000);
http://jsfiddle.net/gf4vpn9s/3/
or delay combination ()
$('.popup').delay(3000).fadeOut();
http://jsfiddle.net/gf4vpn9s/2/
You can use the setTimeout funtion function for your code like this
setTimeout(function(){ $(dialog).close(); }, 5000);
Remember that this is a modal class or identifier.
Source: https://habr.com/ru/post/1619802/More articles:Finding a specific child div through jquery - javascriptLink to Android application is not working properly - androidOpen my application from the link - androidHow to enable webpage scaling for linear layout in Android? - androidAngularJS, Flyer. How can I get lat and lon coordinates dynamically from a third-party service? [problem resolved] - jsonImageViews are invisible if Viewgroups dispatchDraw method is overwritten in android - androidConstrain View to square aspect ratio - flexboxPrinting backslashes in exec () - phpCan I generate navigation from a folder structure using Jekyll? - jekyllМасштабирование GMSMapView для соответствия маркерам GMSMarker? - iosAll Articles