我有一個模板調用game.php把一個div:加載一個PHP模板和使用jquery
<div id="bonus-pub" class="not-display">
<section id="" class="generique">
<div id="">
content
<div id="rtr"></div>
<div id="gfgf class="not-display">
<h2>gfgf</h2>
<p>dsfdsfds</p>
<p class="GC_fdfdfd">
<a class="dfdf">Close</a> </p>
</div>
</div>
</section>
</div>
現在我有另一種觀點whitch是作爲動作generique.php後彈出打開:
<section>
<?php require($file_view);?>
<script>
$(function(){
$('.modal').addClass('generic');
}())
</script>
而另一個文件負責js操作。在這個文件中,我需要創建一個.js調用<div id="bonus-pub" class="not-display">
加載到模板generique.php,我想:
<script>
document.getElementById('bonus-pub').setAttribute('class','display-block');
</script>
但這fonction只把DIV到網頁沒有彈出窗口。所以問題在於,我想在模板game.php
之後將<div id="bonus-pub" class="not-display">
置於generique.php
之後。請幫幫我!! Thx提前!
Ajax調用是generique.php? – TanGio
是的,阿賈克斯調用是在它 –
但在game.php我有多個div,但我想只通過div> bonus-pub – TanGio