< ご使用方法 >へ( jQuery実装方法記述の行へ。)

 

ホーム へ       サンプルページ  タイム プログレス バー  time_progress_bar.htm

ページ縦スクロール量をスクリーン底縁にプログレスバーで表示+タイム プログレス バー。      jQuery,DHTML。      バーの配色などのカスタマイズはテキストエディターなどで可。    all 対応。     コピー、編集し、簡単にWebで応用できまっ、(^ ^)。

デモは、ページを縦スクロールで。

 

< ご使用方法 >

 ・ ローカル(=PC)への保存は、time_progress_bar/をクリック開いたホルダーでtime_progress_bar.htm、timerbar.jsを右クリック、[対象をファイルに保存] - 【ファイルのダウンロード】、【ファイル名を付けて保存】 - <保存する場所>: ……、などで。    ※:  変わってしまった、ファイル名や、*.html 中のパスは要修正。

 ・ このDHTMLの実装方法は、time_progress_bar.htm をテキストエディターで開き、ホームページ作成ソフトなどのHTML挿入/編集メニューなどを使って、新しいページ 1 や hogehoge.html(=任意の挿入先ファイル名) の、 <head> 〜 </head> の任意の行間に (*1)を、さらに <body> 〜 </body>の任意の行間に (*2) をペーストします。

 ・ 編集方法は、hogehoge.html を WordPad や SmipleTextなどのテキストエディター、あるいは ”FrontPage Express” などのホームページ制作ソフトのHTMLタグ挿入/編集メニュー で開き編集します。    下記の(例) (*1) と、(*2)(*3) を参考に太字部分の編集を任意に行います。     ※: テキストエディターによる編集は、HP制作ソフトとの互換性の問題を生じません(HP制作ソフト間は少し生じる)。

 ・ 作動テストは、ローカル(PC)に保存し、 Internet Explorer 10.x〜 などで開いて。     更新の確認は、[F5]キー を押し、最新データ読み込み、で。    あるいは、Internet Explorerを全て閉じ、再起動を行い、閲覧履歴の削除後や、【Internet Explorer】- [ツール] - [インターネット オプション] - [閲覧の履歴] - [削除] などでも。

 ・ アップロードや作動テストは、hogehoge.html と同じ階層〔ホルダー/ディレクトリー〕に、timerbar.js を転送/配置し実施。  ※:別ディレクトリーに配置時は、*.html 中のパスは要修正。   FTPなどで変わってしまったファイル名は要修正。    スクリプト構文中への改行混入は非作動原因。

 ・ 関連情報 : 色記号5〃6スタイルシートリファレンスホームページ開設入門。   Web DevelopmentWeb開発IE10 互換性クックブック〃開発者向けガイド、IE API リファレンスIE 開発 > HTMLとCSS開発ツールでサイトを修正スクリプト デバッグの概要HTMLとCSSのサポートCSSの改良点XML〃リファレンスDHTML

 

(*1) : time_progress_bar.htm (例)         挿入先の  <head> 〜 </head> の、 部分にペーストします。

 HTMLの編集方法   (*1) をテキストエディターで開き、下記↓のHTMLを挿入先ファイルにペースト、太字部分を編集し使用。
〔この列ペースト不要〕   

シフトJIS使用(削除不可)

ieなどに表示するアイコンファイル名(削除可)

<style type= </style>は(削除可)
(*1)〜(*3)表タイトル背景
body 文字色 背景色 下線
ハイパーリンク 〃
表示済みの〃
マウスオーバー時の〃
クリック中の〃
フォント

リンクを新しいWinで開くを標準(削除可)※:target= いろいろ
同じフレーム=_self、ページ全体=_top、親フレーム=_parent

お気に入り、タスクバーに表示するページ名(≠ファイル名)

 

time_progress_bar

 

 

 

 

scroll_progress_bar

 

 

プログレスバー配色

 

jQuery

 

 

<meta http-equiv="Content-Type" content="text/html; charset=x-sjis">

<link REL="SHORTCUT ICON" href="favicon.ico">

<style type="text/css"><!--
.xxx0 { background: #F9F8F9 url('wttec.gif'); }
.xxx1 { background-color:#E3E0DC; }
.xxx2 { background-color:#FFF; }
body { color:#000000; background: #F9F8F9 url('wttec.gif'); text-decoration:none; }
a:link { color:#3C0055; background-color:#FBFAFE; text-decoration:none; }
a:visited { color:#270037; background-color:#EDECEF; text-decoration:none; }
a:hover { color:#1F002E; background-color:#D2F3F4; text-decoration:underline; }
a:active { color:#1F002E; background-color:#F5FFD2; text-decoration:underline; }
font {font-size:12px; line-height:13px;}
body,tr,td,form{ font-family:MS PGothic,MS Gothic,Verdana; font-size: 12px}
 --></style>

<base target="_blank">

<title>サンプルページ  タイム プログレス バー</title>

<!-- ☆1 ---------- ↓ この間をコピー、編集、ペーストします。 ---------- -->
<script language="javascript" src="timerbar.js">
/*
Time-based progress bar- By Brian Gosselin at http://scriptasylum.com/bgaudiodr
Featured on DynamicDrive.com
For full source, visit http://www.dynamicdrive.com
*/
</script>
<!-- ☆1 ---------- ↑ この間をコピー、編集、ペーストします。 ---------- -->
 

<!-- ☆ ----------- ↓ この間をコピー&ペーストします。 ------------ -->
<style>
.scrollindicator{
width: 100%;
height: 7px; /* height of progress bar */
display: block;
background: white;
left: 0;
bottom: 0; /* dock progress bar to bottom of page (change to "top" for top instead) */
cursor: pointer;
position: fixed;
z-index: 1000000;
visibility: hidden;
-webkit-transition: height .2s ease;
transition: height .2s ease;
}

.scrollprogress{
position: absolute;
width: 100%;
height: 100%;
background: #04D3C7; /* background color of progress bar */
-webkit-transform: translate3d(-100%,0,0);
transform: translate3d(-100%,0,0);
=-webkit-transition: -webkit-transform .4s ease;
transition: transform .4s ease; /* animate progress bar? Remove to disable */
}
</style>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
<script>
/***********************************************
* jQuery Page Scroll Progress Bar v1.0 By Dynamic Drive
* Project Page: http://www.dynamicdrive.com/dynamicindex3/pagescrollprogressbar.htm
***********************************************/
jQuery(function($){
var growmouseover = [true, '25px'] // magnify progress bar onmouseover? [Boolean, newheight]

///////// No need to edit beyond here /////////

var $indicatorparts = $(document.body).append('<div class="scrollindicator"><div class="scrollprogress"></div></div>')
var $indicatorMain = $indicatorparts.find('div.scrollindicator')
var $scrollProgress = $indicatorparts.find('div.scrollprogress')
var indicatorHeight = $indicatorMain.outerHeight()
var transformsupport = $scrollProgress.css('transform')
transformsupport = (transformsupport == "none" || transformsupport =="")? false: true

function syncscrollprogress(){
var winheight = $(window).height()
var docheight = $(document).height()
var scrollTop = $(window).scrollTop()
var trackLength = docheight - winheight
var pctScrolled = Math.floor(scrollTop/trackLength * 100) // gets percentage scrolled (ie: 80 NaN if tracklength == 0)
$scrollProgress.css('transform', 'translate3d(' + (-100 + pctScrolled) + '%,0,0)')
}

if (transformsupport){
$indicatorMain.css('visibility', 'visible')

$indicatorMain.on('click', function(e){
var trackLength = $(document).height() - $(window).height()
var scrollamt = e.clientX/($(window).width()-32) * trackLength
$('html,body').animate({scrollTop: scrollamt}, 'fast')
})

if (growmouseover[0]){
$indicatorMain.on('mouseenter touchstart', function(e){
$(this).css('height', growmouseover[1])
e.stopPropagation()
})

$indicatorMain.on('mouseleave', function(e){
$(this).css('height', indicatorHeight)
})

$(document).on('touchstart', function(e){
$indicatorMain.css('height', indicatorHeight)
})
}

$(window).on("scroll load", function(){
requestAnimationFrame(syncscrollprogress)
})
}
})
</script>
<!-- ☆ ----------- ↑ この間をコピー&ペーストします。 ------------ -->
 

 

 

(*2) : time_progress_bar.htm (例)        挿入先の  <body> 〜 </body> の、 部分にペーストします。

 HTMLの編集方法   (*2)をテキストエディターで開き、下記↓のHTMLを挿入先ファイルにペースト、太字部分を編集し使用。
〔この列ペースト不要〕


吹き出し

画像 吹き出し


<body>

<a href="#MANUAL" target="_self" title="ここをクリック ⇒ jQuery実装方法記述の行へ。"><b>↓</b> &lt; ご使用方法 &gt;へ( jQuery実装方法記述の行へ。)</a>
<!--webbot bot="HTMLMarkup" startspan -->
<img src="../win7a/185.jpg" title="画像数=124"/></p>
<img src="../win7a/208.jpg"/></p>

====  この間、説明を省略。  ====

 

<img src="../win7a/99.jpg"/></p>
<img src="../win7a/100.jpg"/></p>
<!--webbot bot="HTMLMarkup" endspan -->
<p> </p>
<p><a name="MANUAL"></a></p><a href="#top" target="_self" onClick="location.href='#top'"><img src="./uparrow.gif" border="0" title="↑ ┌|・.・|┐♪  クリックで、“このページの先頭行へスクロール。" width="100" height="11" align="" /></a>
 

 

< 補足 >    適時参照あれ!。

 ・ Wordpad によるHTMLソース(タグ)を見ながらの直接編集方法。