iframe jquery
parent
7a388e6d59
commit
49f79a0074
@ -1,50 +1,66 @@
|
||||
// index page
|
||||
var modal = document.getElementById("myModal");
|
||||
var btn = document.getElementById("button");
|
||||
var btn_bar = document.getElementById("button-right");
|
||||
var tos_iframe = document.getElementById("tosview");
|
||||
|
||||
// Get the <span> element that closes the modal
|
||||
var span = document.getElementsByClassName("close")[0];
|
||||
// When the user clicks the button, open the modal
|
||||
btn.onclick = function() {
|
||||
modal.style.display = "block";
|
||||
}
|
||||
//right bar list
|
||||
btn_bar.onclick = function() {
|
||||
modal.style.display = "block";
|
||||
}
|
||||
|
||||
// When the user clicks on <span> (x), close the modal
|
||||
span.onclick = function() {
|
||||
modal.style.display = "none";
|
||||
tos_iframe.src = tos_iframe.src;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// index page
|
||||
var t_modal = document.getElementById("t_myModal");
|
||||
var t_btn = document.getElementById("t_button");
|
||||
var t_btn_bar = document.getElementById("t_button-right");
|
||||
var treaty_iframe = document.getElementById("treatyview");
|
||||
|
||||
// Get the <span> element that closes the modal
|
||||
var t_span = document.getElementsByClassName("t_close")[0];
|
||||
// When the user clicks the button, open the modal
|
||||
t_btn.onclick = function() {
|
||||
t_modal.style.display = "block";
|
||||
}
|
||||
//right bar list
|
||||
t_btn_bar.onclick = function() {
|
||||
modal.style.display = "block";
|
||||
}
|
||||
|
||||
// When the user clicks on <span> (x), close the modal
|
||||
t_span.onclick = function() {
|
||||
t_modal.style.display = "none";
|
||||
treaty_iframe.src = treaty_iframe.src;
|
||||
}
|
||||
$(document).ready(function(){
|
||||
|
||||
// index page
|
||||
var modal = document.getElementById("myModal"); //$("#myModal");
|
||||
var btn = document.getElementById("button");
|
||||
var btn_bar = document.getElementById("button-right");
|
||||
var tos_iframe = document.getElementById("tosview");
|
||||
|
||||
// Get the <span> element that closes the modal
|
||||
var span = document.getElementsByClassName("close")[0];
|
||||
// When the user clicks the button, open the modal
|
||||
|
||||
$( ".button-tos" ).click(function() {
|
||||
var text = $(this).text().toLowerCase() + '.html';
|
||||
console.log(text);
|
||||
|
||||
$('iframe#tosview').attr('src', text);
|
||||
modal.style.display = "block";
|
||||
|
||||
|
||||
});
|
||||
|
||||
// btn.onclick = function() {
|
||||
// console.log('btn was clicked');
|
||||
// modal.style.display = "block";
|
||||
// }
|
||||
|
||||
//right bar list
|
||||
btn_bar.onclick = function() {
|
||||
modal.style.display = "block";
|
||||
}
|
||||
|
||||
// When the user clicks on <span> (x), close the modal
|
||||
span.onclick = function() {
|
||||
modal.style.display = "none";
|
||||
tos_iframe.src = tos_iframe.src;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// index page
|
||||
var t_modal = document.getElementById("t_myModal");
|
||||
var t_btn = document.getElementById("t_button");
|
||||
var t_btn_bar = document.getElementById("t_button-right");
|
||||
var treaty_iframe = document.getElementById("treatyview");
|
||||
|
||||
// Get the <span> element that closes the modal
|
||||
var t_span = document.getElementsByClassName("t_close")[0];
|
||||
// When the user clicks the button, open the modal
|
||||
t_btn.onclick = function() {
|
||||
t_modal.style.display = "block";
|
||||
}
|
||||
//right bar list
|
||||
t_btn_bar.onclick = function() {
|
||||
modal.style.display = "block";
|
||||
}
|
||||
|
||||
// When the user clicks on <span> (x), close the modal
|
||||
t_span.onclick = function() {
|
||||
t_modal.style.display = "none";
|
||||
treaty_iframe.src = treaty_iframe.src;
|
||||
}
|
||||
|
||||
})
|
Loading…
Reference in New Issue