Plugin Directory

Changeset 1160988


Ignore:
Timestamp:
05/15/2015 08:15:50 AM (11 years ago)
Author:
maluherby
Message:

Resolve conflict javascript

File:
1 edited

Legend:

Unmodified
Added
Removed
  • scroll-me-up/trunk/show.php

    r1160984 r1160988  
    1 <script src="//ajax.googleapis.com/ajax/libs/jquery/2.0.2/jquery.min.js"></script>
    2 
    31<style>
    4 
    52.scroll-up {
    6 
    73  width: 50px;
    8 
    94  height: 50px;
    10 
    115  opacity: 0.7;
    12 
    136  position: fixed;
    14 
    157  bottom: 50px;
    16 
    178  right: 100px;
    18 
    199  display: none;
    20 
    2110  text-indent: -99999px;
    22 
    23   background:url(<?=plugins_url( 'scroll-me-up/scrollup.png', dirname(__FILE__) )?>) no-repeat;
    24 
    25 z-index:99999;
    26 
     11  background:url(<?php echo plugins_url( 'scrollup.png', __FILE__ ); ?> ) no-repeat;
     12  z-index:99999;
    2713}
    28 
    2914</style>
    30 
    31 
    32 
    3315<script>
    34 
    3516  $(document).ready(function () {
    36 
    3717      $(window).scroll(function () {
    38 
    3918          if ($(this).scrollTop() > 100) {
    40 
    4119              $('.scroll-up').fadeIn();
    42 
    4320          } else {
    44 
    4521              $('.scroll-up').fadeOut();
    46 
    4722          }
    48 
    4923      });
    50 
    5124      $('.scroll-up').click(function () {
    52 
    5325          $("html, body").animate({
    54 
    5526              scrollTop: 0
    56 
    5727          }, 600);
    58 
    5928          return false;
    60 
    6129      });
    62 
    6330  });
    64 
    6531</script>
    66 
    67 
    68 
    69 
    70 
    7132<a href="#" class="scroll-up">scroll</a>
    7233
Note: See TracChangeset for help on using the changeset viewer.