Fix in js and css for pageslide and ad_banner

This commit is contained in:
chris committed 2013-10-23 18:39:30 +08:00
1 parent 94c1d7d5a0
commit 6d5f1a2f12
4 files changed
+29 -9

No files matched your search

+1 -1
View File
@@ -1,7 +1,7 @@
$(function() {
$.pageslide.closeCallback(function(pageslide, item) {
$("tr").removeClass("active");
pageslide.find('.preview').cycle('destroy')
pageslide.find('.preview').cycle('destroy');
});
$.pageslide.loadComplete(function(pageslide, item) {
$("tr").removeClass("active");
@@ -1,6 +1,6 @@
function slideshow (element, bannerEffect, bannerTime, bannerSpeed) {
element.cycle('destroy');
element.children('img').removeAttr('style');
element.children('img').removeAttr('class');;
element.cycle({
fx: bannerEffect,
timeout: bannerTime,
@@ -11,7 +11,6 @@ function setSlideshow(element, data) {
$("#pageslide .ad_banner_ad_fx").children('option:selected').each(function(index, el) {
$(this).val() == 'flipHorz' || $(this).val() == 'flipVert' ? $('.suckIE').show() : $('.suckIE').hide();
});
element.cycle('destroy');
slideshow(element, data['fx'], 2000, 1000);
}
@@ -79,4 +78,4 @@ $(function() {
slideshow($preview, $(this).val(), 2000, 1000);
});
preview();
});
});
+5 -4
View File
@@ -32,6 +32,7 @@
// Are we loading an element from the page or a URL?
if ( settings.href.indexOf("#") === 0 ) {
// Load a page element
window.console.log("in HTML");
var _contentHtml = $(settings.href).html();
var dtd = $.Deferred();
function appendHtml(dtd) {
@@ -45,15 +46,14 @@
}
$.when(appendHtml(dtd))
.done(function() {
setTimeout(function() {
$pageslide.find('.nano').nanoScroller({ scrollTop: 0, iOSNativeScrolling: true });
}, 1);
$pageslide.find('.nano').nanoScroller({ scrollTop: 0, iOSNativeScrolling: true });
if(settings.loadComplete)settings.loadComplete.call(this, $pageslide, $element);
})
.fail(function() {});
} else {
// Load a URL. Into an iframe?
if(settings.iframe) {
window.console.log("iFrame");
var iframe = $("<iframe />").attr({
src: settings.href,
frameborder: 0,
@@ -66,6 +66,7 @@
$pageslide.find('.content').html(iframe).show();
if(settings.loadComplete)settings.loadComplete.call(this, $pageslide, $element);
} else {
window.console.log("Load");
$pageslide.find('.content').load(settings.href, function(response, status, xhr){
if(status == 'success') {
$pageslide.show();
@@ -77,9 +78,9 @@
}
});
}
if($pageslide.find('.error-cover').length) $pageslide.find('.error-cover').remove();
$pageslide.data( 'localEl', false );
}
if($pageslide.find('.error-cover').length) $pageslide.find('.error-cover').remove();
_checkTitle(settings);
}