I am trying to create a new layer on top of existing content on my site when I click a link / button. I am using jquery, but the code that I have does not seem to work properly.
Here is what I have:
$(document).ready(function(){ $("#button").click(function () { $("#showme").insertAfter("#bodytag") $("#showme").fadeIn(2000); });
});
The effect I need is to <div id="showme">...</div>display directly after the # bodytag. <div id="showme">...</div>has a z-index higher than anything else on the site, so it should just appear above the content immediately after # bodytag.
<div id="showme">...</div>
Thanks for the help.
, div, #showme, position: relative, #showme : . , .
, - $() - $(document), jQuery:
$().ready(function(){ $("#button").click(function () { $("#showme").insertAfter("#bodytag").fadeIn(2000); }); });
, #showme position static.
#showme
position
static
Source: https://habr.com/ru/post/1698537/More articles:tf-idf and previously invisible terms - algorithmDetection of duplicate music files - mp3What is the point of the garbage collector - garbage-collectionHow to create Delphi TSpeedButton or SpeedButton in C # 2.0? - c #Как вставить содержимое подзапроса в MS SQL Server? - sql-serverПриложение mdi с несколькими потоками графического интерфейса - multithreadingCan someone help explain this diagram - lispCan I use GNU Aspell for English in my asp.net application? - c #Does the asp.net account password write the password field? - loginHow to update ListView WinForms when using VirtualMode = True? - .netAll Articles