Plugin Directory

Changeset 920356


Ignore:
Timestamp:
05/24/2014 01:53:03 PM (12 years ago)
Author:
Jeriff Cheng
Message:

v1.9

Location:
easy-smooth-scroll-links/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • easy-smooth-scroll-links/trunk/index.php

    r915962 r920356  
    44Plugin URI: http://www.jeriffcheng.com/wordpress-plugins/easy-smooth-scroll-links
    55Description: Create anchors and add up to to 30 scrolling animation effects to links that link to page anchors. You can set scroll speed and offset value.
    6 Version: 1.8
     6Version: 1.9
    77Author: Jeriff Cheng
    88Author URI: http://www.jeriffcheng.com/
     
    102102            register_setting(ESSLPluginOptions_ID.'_options', 'essl_exclude_match_3');
    103103            register_setting(ESSLPluginOptions_ID.'_options', 'essl_exclude_match_4');         
    104             register_setting(ESSLPluginOptions_ID.'_options', 'essl_exclude_match_5'); 
    105 
    106             register_setting(ESSLPluginOptions_ID.'_options', 'essl_top_enabled');
    107             register_setting(ESSLPluginOptions_ID.'_options', 'essl_top_speed');
    108             register_setting(ESSLPluginOptions_ID.'_options', 'essl_top_easing');                   
    109             register_setting(ESSLPluginOptions_ID.'_options', 'essl_top_offset');               
     104            register_setting(ESSLPluginOptions_ID.'_options', 'essl_exclude_match_5');             
    110105        }
    111106        /** function/method
     
    189184            <script type="text/javascript">
    190185                jQuery.noConflict();
    191                 (function( $ ) {
    192                     $(function() {
    193                         // More code using $ as alias to jQuery
    194                         $("area[href*=#],a[href*=#]:not([href=#]):not([href^='#tab']):not([href^='#quicktab']):not([href^='#pane'])<?php if($essl_exclude_begin) echo $essl_exclude_begin; ?><?php if($essl_exclude_match) echo $essl_exclude_match; ?>").click(function() {
    195                             if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') && location.hostname == this.hostname) {
    196                                 var target = $(this.hash);
    197                                 target = target.length ? target : $('[name=' + this.hash.slice(1) +']');
    198                                 if (target.length) {
    199                                 $('html,body').animate({
    200                                 scrollTop: target.offset().top - <?php if (get_option('essl_offset')!='') {echo get_option('essl_offset');} else {echo '20';} ?> 
    201                                 },<?php if (get_option('essl_speed')!='') {echo get_option('essl_speed');} else {echo '900';} ?> ,'<?php echo  get_option('essl_easing','easeInQuint');?>');
    202                                 return false;
    203                                 }
    204                             }
    205                         });
     186                (function($){
     187                 
     188                    var jump=function(e)
     189                    {
     190                       if (e){
     191                           var target = $(this).attr("href");
     192                       }else{
     193                           var target = location.hash;
     194                       }
     195                       
     196                        var scrollToPosition = $(target).offset().top - <?php if (get_option('essl_offset')!='') {echo get_option('essl_offset');} else {echo '20';} ?>;
     197                   
     198                       $('html,body').animate({scrollTop: scrollToPosition },<?php if (get_option('essl_speed')!='') {echo get_option('essl_speed');} else {echo '900';} ?> ,'<?php echo  get_option('essl_easing','easeInQuint');?>' );
     199
     200                    }
     201
     202                    $('html, body').hide()
     203
     204                    $(document).ready(function()
     205                    {
     206                        $("area[href*=#],a[href*=#]:not([href=#]):not([href^='#tab']):not([href^='#quicktab']):not([href^='#pane'])<?php if($essl_exclude_begin) echo $essl_exclude_begin; ?><?php if($essl_exclude_match) echo $essl_exclude_match; ?>").bind("click", jump);
     207
     208                        if (location.hash){
     209                            setTimeout(function(){
     210                                $('html, body').scrollTop(0).show()
     211                                jump()
     212                            }, 0);
     213                        }else{
     214                          $('html, body').show()
     215                        }
    206216                    });
    207                 })(jQuery);
     217                 
     218                })(jQuery)
    208219            </script>
    209220                <?php  }                           
    210                    
    211         if(get_option('essl_top_enabled')){         
    212            
    213             add_action('wp_footer', 'essl_go_to_top',100);         
    214             function essl_go_to_top() { ?> 
    215                 <a id="esslgotop" href="#essltop">Back to Top</a>           
    216                 <style>#esslgotop{position:fixed;bottom:2em;right:2em;text-decoration:none;color:white;background-color:rgba(0,0,0,0.3); font-size:12px;padding:1em;display:none;} #esslgotop:hover{background-color:rgba(0,0,0,0.6);}</style> 
    217                 <script type="text/javascript">
    218                     jQuery.noConflict();
    219                     (function( $ ) {
    220                         $(function() {
    221                             //Go to Top Button Script
    222                             $(document).ready(function(){
    223                                 $("#esslgotop").hide();
    224                                 $(function () {
    225                                     $(window).scroll(function () {
    226                                         if ($(this).scrollTop() > 100) {
    227                                         $('#esslgotop').fadeIn();
    228                                         } else {
    229                                         $('#esslgotop').fadeOut();
    230                                         }
    231                                     });
    232                                     $('a[href=#essltop]').click(function () {
    233                                         $('html, body').animate({scrollTop:<?php if (get_option('essl_top_offset')!='') {echo get_option('essl_top_offset');} else {echo '0';} ?>}, <?php if (get_option('essl_top_speed')!='') {echo get_option('essl_top_speed');} else {echo '900';} ?>,'<?php echo  get_option('essl_top_easing','easeInQuint');?>');
    234                                         return false;
    235                                     });
    236                                 });
    237                             });
    238                         });
    239                     })(jQuery);
    240                 </script>   
    241             <?php }             
    242         }       
    243221    }   
    244222   
  • easy-smooth-scroll-links/trunk/options.php

    r915962 r920356  
    101101    </td>
    102102</tr>
    103            
    104 
    105                
    106            <tr>
    107              <td style="padding:5px;font-family:Verdana, Geneva, sans-serif;color:#666;">
    108                  <label for="essl_top_enabled">
    109                      <p><strong>Enable GoToTop Button ?</strong></p>
    110                      <p><input type="checkbox" value="1" id="gototop_enabled" name="essl_top_enabled"  <?php if (get_option( 'essl_top_enabled' )) echo 'checked' ; ?>><strong>YES</strong>. &rarr;
    111                      GoToTop Speed( Default:900) <input  size="10" id="topspeed" type="text" name="essl_top_speed" value="<?php echo get_option('essl_top_speed'); ?>" /> &rarr;Offset( Default:0) <input  size="10" id="topoffset" type="text" name="essl_top_offset" value="<?php echo get_option('essl_top_offset'); ?>" /> &rarr;Animation Effect <select name="essl_top_easing">
    112     <option disabled="disabled" >Choose an Animation Effects</option>
    113     <option name="essl_top_easing" value="easeInBounce" <?php echo (get_option('essl_top_easing') == "easeInBounce") ? 'selected="selected"' : ''; ?>>easeInBounce</option>
    114     <option name="essl_top_easing" value="easeOutBounce"  <?php echo (get_option('essl_top_easing') == "easeOutBounce") ? 'selected="selected"' : ''; ?>>easeOutBounce</option>
    115     <option name="essl_top_easing" value="easeInOutBounce"  <?php echo (get_option('essl_top_easing') == "easeInOutBounce") ? 'selected="selected"' : ''; ?>>easeInOutBounce</option>
    116     <option name="essl_top_easing" value="easeInElastic"  <?php echo (get_option('essl_top_easing') == "easeInElastic") ? 'selected="selected"' : ''; ?>>easeInElastic</option>
    117     <option name="essl_top_easing" value="easeOutElastic"  <?php echo (get_option('essl_top_easing') == "easeOutElastic") ? 'selected="selected"' : ''; ?>>easeOutElastic</option>
    118     <option name="essl_top_easing" value="easeInOutElastic"  <?php echo (get_option('essl_top_easing') == "easeInOutElastic") ? 'selected="selected"' : ''; ?>>easeInOutElastic</option>
    119     <option name="essl_top_easing" value="easeInCirc"  <?php echo (get_option('essl_top_easing') == "easeInCirc") ? 'selected="selected"' : ''; ?>>easeInCirc</option>
    120     <option name="essl_top_easing" value="easeOutCirc"  <?php echo (get_option('essl_top_easing') == "easeOutCirc") ? 'selected="selected"' : ''; ?>>easeOutCirc</option>
    121     <option name="essl_top_easing" value="easeInOutCirc"  <?php echo (get_option('essl_top_easing') == "easeInOutCirc") ? 'selected="selected"' : ''; ?>>easeInOutCirc</option>
    122     <option name="essl_top_easing" value="easeInBack"  <?php echo (get_option('essl_top_easing') == "easeInBack") ? 'selected="selected"' : ''; ?>>easeInBack</option>
    123     <option name="essl_top_easing" value="easeOutBack"  <?php echo (get_option('essl_top_easing') == "easeOutBack") ? 'selected="selected"' : ''; ?>>easeOutBack</option>
    124     <option name="essl_top_easing" value="easeInOutBack"  <?php echo (get_option('essl_top_easing') == "easeInOutBack") ? 'selected="selected"' : ''; ?>>easeInOutBack</option>
    125     <option name="essl_top_easing" value="easeInQuint"  <?php echo (get_option('essl_top_easing') == "easeInQuint") ? 'selected="selected"' : ''; ?>>easeInQuint</option>
    126     <option name="essl_top_easing" value="easeOutQuint"  <?php echo (get_option('essl_top_easing') == "easeOutQuint") ? 'selected="selected"' : ''; ?>>easeOutQuint</option>
    127     <option name="essl_top_easing" value="easeInOutQuint"  <?php echo (get_option('essl_top_easing') == "easeInOutQuint") ? 'selected="selected"' : ''; ?>>easeInOutQuint</option>
    128     <option name="essl_top_easing" value="easeInExpo"  <?php echo (get_option('essl_top_easing') == "easeInExpo") ? 'selected="selected"' : ''; ?>>easeInExpo</option>
    129     <option name="essl_top_easing" value="easeOutExpo"  <?php echo (get_option('essl_top_easing') == "easeOutExpo") ? 'selected="selected"' : ''; ?>>easeOutExpo</option>
    130     <option name="essl_top_easing" value="easeInOutExpo"  <?php echo (get_option('essl_top_easing') == "easeInOutExpo") ? 'selected="selected"' : ''; ?>>easeInOutExpo</option>
    131     <option name="essl_top_easing" value="easeInCubic"  <?php echo (get_option('essl_top_easing') == "easeInCubic") ? 'selected="selected"' : ''; ?>>easeInCubic</option>
    132     <option name="essl_top_easing" value="easeOutCubic"  <?php echo (get_option('essl_top_easing') == "easeOutCubic") ? 'selected="selected"' : ''; ?>>easeOutCubic</option>
    133     <option name="essl_top_easing" value="easeInOutCubic"  <?php echo (get_option('essl_top_easing') == "easeInOutCubic") ? 'selected="selected"' : ''; ?>>easeInOutCubic</option>
    134     <option name="essl_top_easing" value="easeInQuart"  <?php echo (get_option('essl_top_easing') == "easeInQuart") ? 'selected="selected"' : ''; ?>>easeInQuart</option>
    135     <option name="essl_top_easing" value="easeOutQuart"  <?php echo (get_option('essl_top_easing') == "easeOutQuart") ? 'selected="selected"' : ''; ?>>easeOutQuart</option>
    136     <option name="essl_top_easing" value="easeInOutQuart"  <?php echo (get_option('essl_top_easing') == "easeInOutQuart") ? 'selected="selected"' : ''; ?>>easeInOutQuart</option>
    137     <option name="essl_top_easing" value="easeInSine"  <?php echo (get_option('essl_top_easing') == "easeInSine") ? 'selected="selected"' : ''; ?>>easeInSine</option>
    138     <option name="essl_top_easing" value="easeOutSine"  <?php echo (get_option('essl_top_easing') == "easeOutSine") ? 'selected="selected"' : ''; ?>>easeOutSine</option>
    139     <option name="essl_top_easing" value="easeInOutSine"  <?php echo (get_option('essl_top_easing') == "easeInOutSine") ? 'selected="selected"' : ''; ?>>easeInOutSine</option>
    140     <option name="essl_top_easing" value="easeInQuad"  <?php echo (get_option('essl_top_easing') == "easeInQuad") ? 'selected="selected"' : ''; ?>>easeInQuad</option>
    141     <option name="essl_top_easing" value="easeOutQuad"  <?php echo (get_option('essl_top_easing') == "easeOutQuad") ? 'selected="selected"' : ''; ?>>easeOutQuad</option>
    142     <option name="essl_top_easing" value="easeInOutQuad"  <?php echo (get_option('essl_top_easing') == "easeInOutQuad") ? 'selected="selected"' : ''; ?>>easeInOutQuad</option>
    143 </select></p>
    144                  </label>           
    145 
    146              </td>
    147            </tr>               
    148            
    149            
    150            
    151            
    152            
    153            
    154            
    155            
    156            
    157            
    158103        </tbody>
    159104       
  • easy-smooth-scroll-links/trunk/readme.txt

    r915962 r920356  
    1414 * Choose from __30 Scrolling Animation Effects__
    1515 * You can __exclude certain anchors from scrolling__.
    16  * Option to enable __Go To Top Button__ (with offset, animation effect and speed settings).
    1716 * Works on __all major browsers__: IE, Firefox, Chrome, Safari...
    1817 * __Visual Editor__ Anchor Button
     
    4342
    4443== Changelog ==
     44
     45= 1.9 =
     46
     47* Big Improvement: smooth scroll from one page to another
     48
     49* GoToTop button Removed
    4550
    4651= 1.8 =
     
    101106== Upgrade Notice ==
    102107
    103 = 1.8 =
     108= 1.9 =
    104109
    105 * Visual Editor Anchor Button now using id attribute instead of name. read more: http://www.jeriffcheng.com/html-5-using-attribute-id-instead-of-attribute-name-for-anchors.html
     110* Big Improvement: smooth scroll from one page to another
     111
     112* GoToTop button Removed
Note: See TracChangeset for help on using the changeset viewer.