Colorbox scalePhotos not working
Colorbox scalePhotos not working
Colorbox的scalePhotos参数似乎没有按预期工作。下面是我如何初始化colorbox,在html结尾的</body>
标签之前调用:
jQuery('a.screen').colorbox({
rel: 'screens',
width: '960px',
height: '720px',
photo: 'true',
speed: '1000',
scalePhotos: 'true'
});
尽管这增加了colorbox的大小,但尽管将scalePhotos设置为true,图像仍然以其默认大小显示。我还尝试设置initialWidth/Height以及编辑CSS,但似乎没有工作。
我也试过这个方法:jQuery (.screen) .colorbox ({
onComplete: function() {(这).colorbox美元。resize({innerWidth:'800px', innerHeight:'600px', scalepphoto: true});}
});
下面的图片说明了这个问题:http://punchpedia.com/cbox.png
我不确定它是否能正常工作。就试一次…
jQuery(document).ready(function(){
jQuery("a.media-gallery-thumb").colorbox({
onComplete:function() {
var x = jQuery('div.lightbox-stack div.media-gallery-item div.gallery-thumb-outer div.gallery-thumb-inner a img').width();
var y = jQuery('div.lightbox-stack div.media-gallery-item div.gallery-thumb-outer div.gallery-thumb-inner a img').height();
jQuery(this).colorbox.resize({width:x, height:y});
},
});
});
相关文章:
- $rootScope not working
- jQuery document.ready not working
- Javascript getElementsByTagName not working?
- JQuery.val( ) not working
- Tomcat websocket is not working
- Javascript JSON.parse not working
- NodeJS Multer is not working
- Regex not working
- Ember run.debounce not working
- AngularJs 1 not working
- document.getElementById.style.backgroundImage not working
- Rxjs5, distinct() is not working
- createOscillator noteOn not working
- Javascript - .getHours() not working
- Javascript setTimeout not working | onkeydown
- MongoDB $pull not working
- Express router.use not working
- JSONP not working
- window.opener not working in chrome & IE
- Backbone + RequireJS: Collection.each() is not working