修改colorbox插件调用方法
This commit is contained in:
parent
a91a837b6a
commit
c5c557bf58
|
@ -22,7 +22,7 @@ $this->theme->AppendPlus($this,'colorbox');
|
|||
<?php foreach($this->metadata as $md) : ?>
|
||||
<div class="mditem">
|
||||
<div class="thumb">
|
||||
<a href="javascript:void(0);" class="gallery" rel="/service/bigthumb/uuid/<?= $md['uuid'] ?>">
|
||||
<a href="/service/bigthumb/uuid/<?= $md['uuid'] ?>" class="colorbox">
|
||||
<img src="/service/thumb/id/<?php echo $md['id'];?>" />
|
||||
</a>
|
||||
</div>
|
||||
|
@ -55,9 +55,5 @@ foreach($this->keywords as $cg) :
|
|||
</fieldset></div>
|
||||
<?php endif; ?>
|
||||
<script>
|
||||
$('a.gallery').bind('click',function(){
|
||||
$.colorbox({
|
||||
photo:$(this).attr('rel'),
|
||||
});
|
||||
});
|
||||
$(".colorbox").colorbox({photo:"true"});
|
||||
</script>
|
||||
|
|
|
@ -17,7 +17,7 @@ $this->theme->AppendPlus($this,'colorbox');
|
|||
<?php foreach($this->metadata as $md) : ?>
|
||||
<li class="items">
|
||||
<h4><a href="/data/<?php echo $md['uuid'];?>"><?= $this->escape($md['title']);?></a></h4>
|
||||
<a href="javascript:void(0);" class="thumbnail gallery" rel="/service/bigthumb/uuid/<?= $md['uuid'] ?>">
|
||||
<a href="/service/bigthumb/uuid/<?= $md['uuid'] ?>" class="thumbnail colorbox">
|
||||
<img src="/service/thumb/id/<?php echo $md['id'];?>" alt="">
|
||||
</a>
|
||||
<div class="caption">
|
||||
|
@ -39,11 +39,7 @@ $(function(){
|
|||
itemSelector : '.items',
|
||||
//columnWidth : 240
|
||||
});
|
||||
$('a.gallery').bind('click',function(){
|
||||
$.colorbox({
|
||||
photo:$(this).attr('rel'),
|
||||
});
|
||||
});
|
||||
$(".colorbox").colorbox({photo:"true"});
|
||||
});
|
||||
|
||||
</script>
|
|
@ -24,7 +24,7 @@ $this->theme->AppendPlus($this,'masonry');
|
|||
<?php foreach($this->metadata as $md) : ?>
|
||||
<li class="items">
|
||||
<h4><a href="/heihe/view/uuid/<?php echo $md['uuid'];?>"><?= $this->escape($md['title']);?></a></h4>
|
||||
<a href="javascript:void(0);" class="thumbnail gallery" rel="/service/bigthumb/uuid/<?= $md['uuid'] ?>">
|
||||
<a href="/service/bigthumb/uuid/<?= $md['uuid'] ?>" class="thumbnail colorbox">
|
||||
<img src="/service/thumb/id/<?php echo $md['id'];?>" alt="">
|
||||
</a>
|
||||
<div class="caption">
|
||||
|
@ -44,11 +44,7 @@ $this->theme->AppendPlus($this,'masonry');
|
|||
<script type="text/javascript" charset="utf-8">
|
||||
$(document).ready(function(){
|
||||
$(".colorbox").colorbox({rel:"colorbox",photo:"true",transition:"fade"});
|
||||
$('a.gallery').bind('click',function(){
|
||||
$.colorbox({
|
||||
photo:$(this).attr('rel'),
|
||||
});
|
||||
});
|
||||
$(".colorbox").colorbox({photo:"true"});
|
||||
});
|
||||
$('#container').masonry({
|
||||
itemSelector : '.items',
|
||||
|
|
Loading…
Reference in New Issue