我正在使用CSS Bootstrap的Modal功能,它工作得很好。然而,我想添加一个功能,当模式对话框打开,网页的其余部分被.mode-backdrop覆盖时,来自页面结构范围内不同位置的外部元素之一可以显示在背景之上:
<div id="outside-element">
I want this element exposed even while the modal is active,
upon clicking the button in the modal dialog box
</div>
<div id="help
我正在尝试接受JS插件的所有links#modal_trigger在我的网站,但它只适用于第一个。怎么了?我不能知道。
我的JS代码:
(function($){
$.fn.extend({
leanModal:function(options){
var defaults={top:100,overlay:0.5,closeButton:null};
var overlay=$("<div id='lean_overlay'></div>");
我是CSS的新手,我知道周围有更多这样的话题。但似乎没有一个是我的问题的解决方案。因此,在尝试了2个小时后,所有的隐藏,过渡,显示等,并与风险张贴副本在这里是我的问题。
如何使用CSS和Javascript流畅地显示此模式?
CSS
/* The Modal (background) */
.modalestate {
visibility: hidden; /* Hidden by default */
position: fixed; /* Stay in place */
z-index: 1; /* Sit on top */
left: 25;
top: 15;
我有数据
const data = [
{
id: "React",
img: "https://cdn.worldvectorlogo.com/logos/react-2.svg",
info: "React is the most popular JavaScript library and is used by Facebook, Instagram, Netflix, Airbnb, Uber Eats, and many more.",
data: [{"
我已经制作了一个简单的文件器(以链接作为文件名)。当我单击文件名时,将运行以下javascript:
<script>
$(function () {
$(".fileSelect").click(function () {
var name = $(this).text(); //gets the name of the clicked file
var id = $(this).attr("id");// gets the id of the clicked file
我不确定如何处理这个问题。
我在HTML中制作了一些按钮,并添加了一些数据属性。
$(".roleBtn").click(roleBtnClicked);
function roleBtnClicked(event){
reg.roleName = $(this).html(); /* Get role name: Actor */
reg.blueBtn = $(this).data('blue'); /* Get blue-btn-1 */
reg.the_Num = $(this).data(