Changeset 498198
- Timestamp:
- 01/31/2012 10:09:09 PM (14 years ago)
- Location:
- infinite-scroll/branches/Beta
- Files:
-
- 3 edited
-
includes/infinite-scroll.class.php (modified) (2 diffs)
-
js/behaviors/manual-trigger.js (modified) (1 diff)
-
js/behaviors/manual-trigger.min.js (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
infinite-scroll/branches/Beta/includes/infinite-scroll.class.php
r498151 r498198 103 103 public static function addStyle() 104 104 { 105 switch(get_option('infscr_image_align')) 106 { 107 default: 108 case 0: 109 $align = "left"; 110 break; 105 $options = get_option('infscr_options'); 106 switch($options['infscr_image_align']) 107 { 111 108 case 1: 112 109 $align = "center"; … … 115 112 $align = "right"; 116 113 break; 114 default: 115 case 0: 116 $align = "left"; 117 break; 117 118 } 118 119 echo "<!-- Infinite-Scroll Style --> 119 120 <style type=\"text/css\"> 120 #infscr-loading img{ text-align: $align; }121 #infscr-loading { text-align: $align; } 121 122 </style>\r\n"; 122 123 return true; -
infinite-scroll/branches/Beta/js/behaviors/manual-trigger.js
r498151 r498198 79 79 var opts = this.options, 80 80 instance = this; 81 this._debug("Binding Manual Trigger..")82 81 // Bind nextSelector link to retrieve 83 82 jQuery(opts.nextSelector).click(function(e) { 84 this._debug("Manual Trigger Clicked..")85 83 if (e.which == 1 && !e.metaKey && !e.shiftKey) { 86 84 e.preventDefault(); -
infinite-scroll/branches/Beta/js/behaviors/manual-trigger.min.js
r498151 r498198 1 jQuery.extend(jQuery.infinitescroll.prototype,{_loadcallback_twitter:function a(a,b){var c=this.options,d=this.options.callback,e=c.state.isDone?"done":!c.appendCallback?"no-append":"append",f;switch(e){case"done":this._showdonemsg();return false;break;case"no-append":if(c.dataType=="html"){b="<div>"+b+"</div>";b=$(b).find(c.itemSelector)}break;case"append":var g=a.children();if(g.length==0){return this._error("end")}f=document.createDocumentFragment();while(a[0].firstChild){f.appendChild(a[0].firstChild)}this._debug("contentSelector",jQuery(c.contentSelector)[0]);jQuery(c.itemSelector).filter(":last").after(f);b=g.get();break}c.loading.finished.call(jQuery(c.contentSelector)[0],c);if(c.animate){var h=jQuery(window).scrollTop()+jQuery("#infscr-loading").height()+c.extraScrollPx+"px";jQuery("html,body").animate({scrollTop:h},800,function(){c.state.isDuringAjax=false})}if(!c.animate)c.state.isDuringAjax=false;d(this,b)},_setup_twitter:function b(){var a=this.options,b=this; this._debug("Binding Manual Trigger..");jQuery(a.nextSelector).click(function(a){this._debug("Manual Trigger Clicked..");if(a.which==1&&!a.metaKey&&!a.shiftKey){a.preventDefault();b.retrieve()}});b.options.loading.start=function(a){a.loading.msg.appendTo(a.loading.selector).show(a.loading.speed,function(){beginAjax(a)})}}});1 jQuery.extend(jQuery.infinitescroll.prototype,{_loadcallback_twitter:function a(a,b){var c=this.options,d=this.options.callback,e=c.state.isDone?"done":!c.appendCallback?"no-append":"append",f;switch(e){case"done":this._showdonemsg();return false;break;case"no-append":if(c.dataType=="html"){b="<div>"+b+"</div>";b=$(b).find(c.itemSelector)}break;case"append":var g=a.children();if(g.length==0){return this._error("end")}f=document.createDocumentFragment();while(a[0].firstChild){f.appendChild(a[0].firstChild)}this._debug("contentSelector",jQuery(c.contentSelector)[0]);jQuery(c.itemSelector).filter(":last").after(f);b=g.get();break}c.loading.finished.call(jQuery(c.contentSelector)[0],c);if(c.animate){var h=jQuery(window).scrollTop()+jQuery("#infscr-loading").height()+c.extraScrollPx+"px";jQuery("html,body").animate({scrollTop:h},800,function(){c.state.isDuringAjax=false})}if(!c.animate)c.state.isDuringAjax=false;d(this,b)},_setup_twitter:function b(){var a=this.options,b=this;jQuery(a.nextSelector).click(function(a){if(a.which==1&&!a.metaKey&&!a.shiftKey){a.preventDefault();b.retrieve()}});b.options.loading.start=function(a){a.loading.msg.appendTo(a.loading.selector).show(a.loading.speed,function(){beginAjax(a)})}}});
Note: See TracChangeset
for help on using the changeset viewer.