Javascript 是的,我没有正确地理解你。你能解释一下吗。此外,这行代码似乎将内联样式应用于项目。 <ul id="og-grid" class="og-grid"> <li><a target="_blank" h
是的,我没有正确地理解你。你能解释一下吗。此外,这行代码似乎将内联样式应用于项目。Javascript 是的,我没有正确地理解你。你能解释一下吗。此外,这行代码似乎将内联样式应用于项目。 <ul id="og-grid" class="og-grid"> <li><a target="_blank" h,javascript,html,css,height,Javascript,Html,Css,Height,是的,我没有正确地理解你。你能解释一下吗。此外,这行代码似乎将内联样式应用于项目。 <ul id="og-grid" class="og-grid"> <li><a target="_blank" href="www.somewebsite.com" data- largesrc="uploadimage/project/sfs.jpg" data-title="Website Redesign of " data-type
<ul id="og-grid" class="og-grid">
<li><a target="_blank" href="www.somewebsite.com" data-
largesrc="uploadimage/project/sfs.jpg" data-title="Website Redesign of "
data-type="WebSite" data-description="Website Redesign "><img
src="uploadimage/project/thumb/sfs.jpg" alt="img00"></a></li>
<li style="**transition: height 350ms ease 0s; height: 719px;**"
class="">
<a href="#/" data-largesrc="uploadimage/project/notouch.jpg" data-
title="No Touch" data-type="Mobile Application" data-description="Notouch
is a simple but useful app that helps you to lock the screen temporarily
to prevent unauthorized clicks or to go to other apps from the current
screen. This is especially useful when you give your Phone to kids to view
videos or YouTube. This app will disable the touch facility temporarily.">
<img src="uploadimage/project/thumb/notouch.jpg" alt="img01"></a></li>
<li><a target="_blank" href="www.fhjgh.com" data-
largesrc="uploadimage/project/2capture.jpg" data-title="Test" data-
type="WebSite" data-description="hI there njwehkasd kahffhsaf sdkfhsdf
saklhflkdshf sdhfksdhf kldsh"><img
src="uploadimage/project/thumb/2capture.jpg" alt="img02"></a></li>
<li><a target="_blank" href="http://www.jhghjghjg.in" data-
largesrc="uploadimage/project/green.jpg" data-title="Green Homes" data-
type="WebSite" data-description=", due to better usage of pictures"><img
src="uploadimage/project/thumb/green.jpg" alt="img03"></a></li>
<li><a href="#/" data-largesrc="uploadimage/project/leonardo.jpg" data-
title="Leonardo" data-type="Logo Design" data-description="The Logo design
. We have used the negative space design concept here to make the L hidden
inside a box ( Box represent a furniture)"><img
src="uploadimage/project/thumb/leonardo.jpg" alt="img04"></a></li>
</ul>
open: function () {
setTimeout($.proxy(function () {
// set the height for the preview and the item
this.setHeights();
// scroll to position the preview in the right place
this.positionPreview();
}, this), 25);
},
close: function () {
var self = this,
onEndFn = function () {
if (support) {
$(this).off(transEndEventName);
}
self.$item.removeClass('og-expanded');
self.$previewEl.remove();
};
setTimeout($.proxy(function () {
if (typeof this.$largeImg !== 'undefined') {
this.$largeImg.fadeOut('fast');
}
this.$previewEl.css('height', 0);
// the current expanded item (might be different from this.$item)
var $expandedItem = $items.eq(this.expandedIdx);
$expandedItem.css('height', $expandedItem.data('height')).on(transEndEventName, onEndFn);
if (!support) {
onEndFn.call();
}
}, this), 25);
return false;
},
calcHeight: function () {
var heightPreview = winsize.height - this.$item.data('height') - marginExpanded,
itemHeight = winsize.height;
if (heightPreview < settings.minHeight) {
heightPreview = settings.minHeight;
itemHeight = settings.minHeight + this.$item.data('height') + marginExpanded;
}
this.height = heightPreview;
this.itemHeight = itemHeight;
},
setHeights: function () {
var self = this,
onEndFn = function () {
if (support) {
self.$item.off(transEndEventName);
}
self.$item.addClass('og-expanded');
};
this.calcHeight();
this.$previewEl.css('height', this.height);
this.$item.css('height', this.itemHeight).on(transEndEventName, onEndFn);
if (!support) {
onEndFn.call();
}
},
positionPreview: function () {
// scroll page
// case 1 : preview height + item height fits in window´s height
// case 2 : preview height + item height does not fit in window´s height and preview height is smaller than window´s height
// case 3 : preview height + item height does not fit in window´s height and preview height is bigger than window´s height
var position = this.$item.data('offsetTop'),
previewOffsetT = this.$previewEl.offset().top - scrollExtra,
scrollVal = this.height + this.$item.data('height') + marginExpanded <= winsize.height ? position : this.height < winsize.height ? previewOffsetT - (winsize.height - this.height) : previewOffsetT;
$body.animate({ scrollTop: scrollVal }, settings.speed);
},
setTransition: function () {
this.$previewEl.css('transition', 'height ' + settings.speed + 'ms ' + settings.easing);
this.$item.css('transition', 'height ' + settings.speed + 'ms ' + settings.easing);
},
getEl: function () {
return this.$previewEl;
}
}
return {
init: init,
addItems: addItems
};
close: function () {
....
setTimeout($.proxy(function () {
document.getElementsByClassName('og-expander')[0].parentElement.removeAttribute("style");
if (typeof this.$largeImg !== 'undefined') {
....