我正在使用colorbox。將參數傳遞給colorbox
<a class="publishpost" href="<?= base_url()."publish_ads/publishon/".$adds[$i]->getId()?>"></a>
<script>
$(document).ready(function(){
$('.publishpost').colorbox({ width: '900px', height: '500px' });
});
</script>
我有這個鏈接指向codeigniter控制器。我想從加載colorbox的視圖訪問一些變量。我怎樣才能做到這一點。我想過一個表單或jQuery的東西,但我仍然不知道如何傳遞參數。
,我打算通過作爲參數應用的值是這樣的,例如:
<div class="external_wall_right_col_sub_ad_img"><img src="<?=$img?>" alt="small ad"></div>
我想在$ IMG變量傳遞給顏色框。