-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.html
678 lines (632 loc) · 34 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
<!--
Copyrighted by : St.Thomas HSS Erumely 2021
Contributed by : computer science batch 2019-2021
Initial release: 2020 November (BETA)
Updated On : __/__/2021
-->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<!-- Mobile Metas -->
<meta name="viewport" content="width=device-width, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
<!-- Site Metas (seo) -->
<title>ST.THOMAS HSS ERUMELY</title>
<!-- KEYWORD FOR META TAG-->
<meta name="keywords"
content="erumely, kanjirapally, kottayam, kerala, india, erumely school, hss, erumely best school, erumeli, hss school, hss school kerala, hss school manimala, hss school kottayam, hss school kanjirapally, hss school mundakkayam, mundakkayam, best school in kerala, best school in kottayam, best school in erumely, best school in mundakkayam, best school in kanjirappally, best hss, best hss erumely, best hss kottayam, best hss kerala, kerala syllabus, plus one, plus two, plus school, plus two school, best hss mundakkayam, best hss kanjirapally, plus one plus two, best erumely, best kottayam, best kerala, best kanjirapally, best mundakkayam, good, good school, good school in, good school in kerala, good hss, good school in erumely, good school in kottayam, good school in kanjirapally, good school in mundakkaym, a plus, hsslive, hss kerala, st. thomas, st. thomas hss, st.thomas hss erumely, sthomashsserumely, sthomas hss erumely, sthss erumely, sabarimala, school near, school near kerala, school near kottayam, school near mundakkayam, school near kanjirappally, the school, the erumely, onam celebration erumely, erumely youtube, erumely facebook, erumely map, erumely google, xmas celebration erumely, 2020 erumely, 2020 school, middle school, high school, higher, higher secondary, higher secondary school, secondary school, html, css, php, java, computer science, biology science, commerce, computer, science, biology, commerce with computer, erumely html, erumely website, school website, school form, forms, improvementl, final exam, erumely school website, st. thomas hss erumely website, sthss erumely website, march exam, march, science programme, program, still model, working model, hss school with computer science, school with computer science, computer science school, hss cs, cs 2020, bio, bio 2020, royal commerce, cs school, cs hss 2020, cs hss kerala, cs hss kottayam, cs hss kanjirappally, cs hss mundakkayam, cs hss erumely, cs available schools in, cs available, cs available schools in kerala, cs available schools in kottayam, cs available schools in karukachal, cs available schools in erumely, cs available schools in kanjirapally, cs available schools in mundakkayam, computer science in, computer science available, computer science available in, commerce with, commerce with cs, commerce with computer, commerce with kerala, commerce with kottayam, commerce with erumely, commerce with mundakayam, commerce with kanjirapally, commerce with computer in, commerce with computer in kerala, commerce with computer in kottayam, commerce with computer in erumely">
<!--DESCRIPTION FOR META TAG-->
<meta name="description"
content="St.Thomas HSS, a Christian minority institution under the Corporate Management of Schools,Eparchy of Kanjirapally is situated in the land of religious harmony,Erumely. Our School tries to impart quality education to students and they are encouraged to think critically and creatively.We have a group of dedicated teachers who are passionate about their profession.Our School tries to provide ideal education by nurturing the talents of each and every student and by instilling in them spiritual vitality.A lifelong learning experience is provided to our students through different curricular and extra-curricular activities.">
<meta name="author" content="ST.Thomas HSS Erumely">
<!-- Site Icons -->
<link rel="shortcut icon" href="#" type="image/x-icon" />
<link rel="apple-touch-icon" href="#" />
<!-- favicon here -->
<!-- Bootstrap CSS -->
<link rel="stylesheet" href="css/bootstrap.min.css?v=1" />
<!-- Pogo Slider CSS -->
<link rel="stylesheet" href="css/pogo-slider.min.css?v=1" />
<!-- Site CSS -->
<link rel="stylesheet" href="css/style.css?v=2" />
<!-- Responsive CSS -->
<link rel="stylesheet" href="css/responsive.css?v=1" />
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
<script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body id="home" data-spy="scroll" data-target="#navbar-wd" data-offset="98" onload="homepagefn();">
<!-- Loader SW-01-->
<div id="preloader">
<div class="loader">
<img src="images/loader.gif?v=1" alt="loading.." />
</div>
</div>
<!-- end of loader -->
<!-- Header SW-02-->
<header class="top-header">
<nav class="navbar header-nav navbar-expand-lg">
<div class="container-fluid">
<!--HEAD IMAGE-->
<a class="navbar-brand" href="index.html"><img src="images/logo.png?v=1" alt="logo_image"></a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbar-wd"
aria-controls="navbar-wd" aria-expanded="false" aria-label="Toggle navigation">
<span></span>
<span></span>
<span></span>
</button>
<div class="collapse navbar-collapse justify-content-end" id="navbar-wd">
<ul class="navbar-nav">
<!-- MENU -->
<li><a class="nav-link" href="about.html">About</a></li>
<li><a class="nav-link" href="achievements.html">Achievements</a></li>
<li><a class="nav-link" href="achievements.html">Higher Studies</a></li>
<li><a class="nav-link" href="gallery.html">Gallery</a></li>
<li><a class="nav-link" href="contact.html">Contact Us</a></li>
</ul>
</div>
</div>
</nav>
</header>
<!-- End of header -->
<!-- Start Banner SW-03 -->
<div class="ulockd-home-slider">
<div class="container-fluid">
<div class="row">
<!-- Pogoslider -->
<div class="pogoSlider" id="js-main-slider">
<!-- Slider (1) -->
<div class="pogoSlider-slide" style="background-image:url(images/banner1.jpeg?v=1);">
<div class="container">
<div class="row">
<div class="col-md-12">
<div class="slide_text">
<h3><span class="theme_color">Welcome To The Official Website
Of</span><br>ST.THOMAS HSS ERUMELY</h3>
</div>
</div>
</div>
</div>
</div>
<!-- End Of Slider (1) -->
<!-- Slider (2) -->
<div class="pogoSlider-slide" style="background-image:url(images/banner2.jpeg?v=1);">
<div class="container">
<div class="row">
<div class="col-md-12">
<div class="slide_text">
<h3>"Be The Light And To Lighten The
World"</h3>
<br>
</div>
</div>
</div>
</div>
</div>
<!-- End Of Slider (2) -->
</div>
<!-- End of pogoSlider -->
</div>
</div>
</div>
<!-- End Of Banner -->
<!-- Pop Up Message SW-03A -->
<div class="msgBoxSthss" id="msgBox1">
<span title="close" onclick="closeMsgBox();">✖</span>
<div class="container">
<div class="row">
<div class="col-md-12">
<h2>Got a suggestion?</h2>
</div>
</div>
<div class="row">
<div class="col-md-12">
<p><a href="" target="_blank">>> Let us know</a></p>
</div>
</div>
</div>
</div>
<!-- End Of Pop Up Message -->
<!-- Tabbar SW-04 -->
<div class="section tabbar_menu">
<div class="container">
<div class="row">
<div class="col-md-12">
<div class="tab_menu">
<center>
<!-- commented code: tabbar with toplinks | replaced with marquee -->
<!--<p class="hideonmobile" style="padding-top: 5px;">TOP_LINK_1
<b>|</b> TOP_LINK_2 <b>|</b>
TOP_LINK_3</p>
<p class="hideonpc" style="padding-top: 5px;">TOP_LINK_1
<b>|</b>
you cant see me on pc <b>|</b> TOP_LINK_3
</p>-->
<marquee class="sthssmarq" style="padding-top: 5px;" direction=”right” onmouseover="stop()"
onmouseout="start()"><span>★This is something really important★</span><span>★Admission
for plus one started★</span><span>★Onam mid term exam
cancelled★</span><span>★attention! stand at ease★</span></marquee>
</center>
</div>
</div>
</div>
</div>
</div>
<!-- End Of Tabbar -->
<!-- About Section SW-05 -->
<div class="section margin-top_50">
<div class="container">
<div class="row">
<div class="col-md-12 layout_padding_2">
<div class="full">
<div class="heading_main text_align_left">
<h2><span>Welcome to</span> ST. THOMAS HSS ERUMELY</h2>
</div>
<div class="full">
<p class="alignptext">St.Thomas HSS, a Christian minority institution under the Corporate
Management of
Schools, Eparchy of Kanjirapally is situated in the land of religious harmony, Erumely.
Our School tries to impart quality education to students and they are encouraged to
think critically and creatively. We have a group of dedicated teachers who are
passionate
about their profession. Our School tries to provide ideal education by nurturing the
talents of each and every student and by instilling in them spiritual vitality. A
lifelong learning experience is provided to our students through different curricular
and extra-curricular activities.</p>
</div>
<div class="full">
<a class="hvr-radial-out button-theme" href="about.html">Read More</a>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-md-3"></div>
<div class="col-md-3">
<div class="full">
<img src="images/img1.jpeg?v=1" alt="image" /><br>
</div>
</div>
<div class="col-md-3">
<div class="full">
<img src="images/img2.jpeg?v=1" alt="image" /><br>
</div>
</div>
<div class="col-md-3"></div>
</div>
</div>
</div>
<!-- End Of About Section -->
<!-- courses section SW-06 -->
<div class="section layout_padding">
<div class="container">
<div class="row">
<div class="col-md-12">
<div class="full">
<div class="heading_main text_align_center">
<h6><span>Courses </span>Offered</h6>
</div>
</div>
</div>
<div class="col-md-4">
<div class="full blog_img_popular" id="mu1">
<img class="img-responsive" src="images/courses/bio.jpeg?v=1" alt="image" />
<h4 id="adh1">Science Biology</h4>
</div>
</div>
<div class="col-md-4">
<div class="full blog_img_popular" id="mu2">
<img class="img-responsive" src="images/courses/cs.jpeg?v=1" alt="image" />
<h4 id="adh2">Computer Science</h4>
</div>
</div>
<div class="col-md-4">
<div class="full blog_img_popular" id="mu3">
<img class="img-responsive" src="images/courses/com.jpeg?v=1" alt="image" />
<h4 id="adh3">Commerce With Computer</h4>
</div>
</div>
</div>
</div>
</div>
<!-- End Of Courses Section -->
<!-- Description section SW-00 -->
<!-- Commented code: Desciption section | removed-->
<!--<div class="section margin-top_50 silver_bg">
<div class="container">
<div class="row">
<div class="col-md-4"><br class="hideonmobile">
<div class="full float-right_img">
<img src="images/img001.png" alt="#" />
</div>
</div>
<div class="col-md-6 layout_padding_2">
<div class="full">
<div class="heading_main text_align_left">
<h2><span>Rev. Fr. Dr. Sebastian Kollamkunnel</h2>
</div>
<div class="full">
<p>[QUOTED-TEXT]"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod
tempor incididunt ut labore et dolore magna aliqua.
Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea
commodo consequat. Duis aute irure dolor
in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.
Excepteur sint occaecat cupidatat non proident,
sunt in culpa qui officia deserunt mollit anim id est laborum"</p>
</div>
<div class="full">
<a class="hvr-radial-out button-theme" href="#">BUTTON</a>
</div>
</div>
</div>
</div>
</div>
</div>-->
<!-- End Of Description Section-->
<!-- News And Activities Section SW-07 -->
<div class="section layout_padding padding_bottom-0">
<div class="container">
<div class="row">
<div class="col-md-12">
<div class="full">
<div class="heading_main text_align_center">
<h6><span>News & Activities</span></h6>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-lg-12">
<div id="demo" class="carousel slide" data-ride="carousel">
<!-- slideshow (1) -->
<div class="carousel-inner">
<div class="carousel-item active">
<div class="row">
<div class="col-lg-6 col-md-6 col-sm-12">
<div class="full blog_img_popular">
<img class="img-responsive" src="images/news/imga.jpeg?v=1" alt="#" />
<h4>Online Class Time Table Updated</h4>
<p>A revision of the online class time table was necessary as classes
started for plus one students. The revised timetable was given in the
concerned groups</p>
</div>
</div>
<div class="col-lg-6 col-md-6 col-sm-12">
<div class="full blog_img_popular">
<img class="img-responsive" src="images/news/imgb.jpeg?v=1" alt="#" />
<h4>Carrier Guidance Webinar</h4>
<p>Carrier guidance webinar was held on November second. Around 250 students
participated in the webinar</p>
</div>
</div>
</div>
</div>
<!-- slideshow (2) -->
<div class="carousel-item">
<div class="row">
<div class="col-lg-6 col-md-6 col-sm-12">
<div class="full blog_img_popular">
<img class="img-responsive" src="images/news/imgc.jpeg?v=1" alt="#" />
<h4>Power Quiz</h4>
<p>Power Quiz Was held on [date]. [name1] won the 1st place and [name2] won
the 2nd place</p>
</div>
</div>
<div class="col-lg-6 col-md-6 col-sm-12">
<div class="full blog_img_popular">
<img class="img-responsive" src="images/news/imgd.jpeg?v=1" alt="#" />
<h4>Praveshanolsavam (Upcoming)</h4>
<p>Praveshanolsavam for first year students will be conducted on 22nd
November</p>
</div>
</div>
</div>
</div>
</div>
<!-- Controls for slider -->
<a class="carousel-control-prev" href="#demo" data-slide="prev">
<span class="carousel-control-prev-icon"></span>
</a>
<a class="carousel-control-next" href="#demo" data-slide="next">
<span class="carousel-control-next-icon"></span>
</a>
</div>
</div>
</div>
</div>
</div>
<!-- End Of News And Activity Section -->
<!-- Clubs And Programmes SW-08 -->
<div class="section margin-top_50">
<div class="container">
<div class="row">
<div class="col-md-12">
<div class="full">
<div class="heading_main text_align_center">
<h6><span>Clubs & Programme</span></h6>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="container">
<!-- images -->
<div class="row">
<div class="col-md-2">
<center><a href="gallery.html#nsL"><img src="images/logo/nss.jpg?v=1" id="candp1"
class="img-responsive"></a></center><br>
</div>
<div class="col-md-2">
<center><a href="gallery.html#sgL"><img src="images/logo/sg.jpg?v=1" id="candp2"
class="img-responsive"></a></center><br>
</div>
<div class="col-md-2">
<center><a href="gallery.html#apL"><img src="images/logo/a.jpg?v=1" id="candp3"
class="img-responsive"></a>
</center><br>
</div>
<div class="col-md-2">
<center><a href="gallery.html#cgL"><img src="images/logo/cg.jpg?v=1" id="candp4"
class="img-responsive"></a></center><br>
</div>
<div class="col-md-2">
<center><a href="gallery.html#ecL"><img src="images/logo/ec.jpg?v=1" id="candp5"
class="img-responsive"></a></center><br>
</div>
<div class="col-md-2">
<center><a href="gallery.html#scL"><img src="images/logo/sc.jpg?v=1" id="candp6"
class="img-responsive"></a></center><br>
</div>
</div>
</div>
<!-- End Of Clubs And Programmes -->
<!--<div class="container">
<div class="row">
<div class="col-md-12">
<div class="fixedimg" width="100%" height="100%">
test
</div>
</div>
</div>
</div>-->
<!-- Contact Us SW-09 -->
<div class="section layout_padding padding_bottom-0">
<div class="container">
<div class="row">
<div class="col-md-12">
<div class="full">
<div class="heading_main text_align_center">
<h6><span>Contact Us</span></h6>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="container">
<div class="row">
<div class="col-md-6"><br>
<!--<center>-->
<h2 id="whours">Loading...</h2>
<!--</center>-->
<p>Hours may differ. Please contact us to ensure working hours</p>
</div>
</div>
</div>
<!-- Form -->
<div class="section contact_section" style="background:#12385b;">
<div class="container">
<div class="row">
<div class="layout_padding col-lg-6 col-md-6 col-sm-12">
<div class="contact_form">
<!-- commented code: php form | replaces with google form-->
<!-- <form action="php/form-process.php">
<fieldset>
<div class="full field">
<input type="text" placeholder="Your Name" name="Your name" />
</div>
<div class="full field">
<input type="email" placeholder="Email Address" name="Email Id" />
</div>
<div class="full field">
<input type="phn" placeholder="Phone Number" name="Phone number" />
</div>
<div class="full field">
<textarea placeholder="Message"></textarea>
</div>
<div class="full field">
<div class="center"><button>Send</button></div>
</div>
</fieldset>
</form>-->
<iframe
src="https://docs.google.com/forms/d/e/1FAIpQLSeODNNCEOCQPEQ_qvMnXy_U2tg2OYT0evRk3WlfweytmgJ8gA/viewform?embedded=true"
width="100%" height="500" frameborder="0" marginheight="0" marginwidth="0">Form
Loading...</iframe>
</div>
</div>
</div>
</div>
</div>
<!-- End Of Contact Us -->
<!-- Footer SW-10 -->
<footer class="footer-box">
<div class="container">
<div class="row">
<div class="col-xs-12 col-sm-6 col-md-6 col-lg-3">
<div class="footer_blog">
<!-- commented code: school logo | removed-->
<!--<div class="full margin-bottom_30">
<img src="images/footer_logo.png" alt="#" />
</div>-->
<div class="full white_fonts">
<h4>ST.Thomas HSS Erumely</h4>
<p>Join Us In Building A Better World.</p>
</div>
</div>
</div>
<!-- Quick Links -->
<div class="col-xs-12 col-sm-6 col-md-6 col-lg-3">
<div class="footer_blog footer_menu white_fonts">
<h3>Quick links</h3>
<ul>
<li><a target="_blank" href="http://itschool.gov.in" class="qla">> IT @ School</a></li>
<li><a target="_blank" href="http://keralaresults.nic.in/" class="qla">> KERALA EXAMINATION
RESULTS</a></li>
<li><a target="_blank" href="http://dhsekerala.gov.in/" class="qla">> DHSE Kerala</a></li>
<li><a target="_blank" href="http://education.kerala.gov.in/" class="qla">> General
Education</a></li>
</ul>
</div>
</div>
<!-- Suggestions -->
<div class="col-xs-12 col-sm-6 col-md-6 col-lg-3">
<div class="footer_blog full white_fonts">
<h3>Suggestions</h3>
<p>Mail Us. We would like to here from you.</p>
<div class="newsletter_form">
<form>
<ul>
<li><button><a href="mailto:[email protected]">Mail Us</a></button></li>
</ul>
</form>
</div>
</div>
</div>
<!-- address details -->
<div class="col-xs-12 col-sm-6 col-md-6 col-lg-3">
<div class="footer_blog full white_fonts">
<h3>Contact Us</h3>
<ul class="full">
<li><img src="images/i5.png?v=1"><span><a href="https://goo.gl/maps/D9Ek62x6NstZBcm6A"
target="_blank">St.Thomas
HSS Erumely, Kottayam District,<br>Kerala, India</a></span></li>
<li><img src="images/i6.png?v=1"><span><a
href="mailto:[email protected]">[email protected]</a></span></li>
<li><img src="images/i7.png?v=1"><span><a href="tel:+919961676180">+91 9961676180
(Principal)</a><br><a href="tel:04828-212379">04828-212379</a></span></li>
</ul>
</div>
</div>
</div>
</div>
</footer>
<!-- End Of Footer -->
<!-- copyrights SW-11 -->
<div class="footer_bottom">
<div class="container">
<div class="row">
<div class="col-12">
<p class="crp">© Copyrights 2021 St.Thomas HSS Erumely</p>
</div>
</div>
</div>
</div>
<!-- scroll top SW-12 -->
<a href="#" id="scroll-to-top" class="hvr-radial-out"><i class="fa fa-angle-up"></i></a>
<!-- ALL JS FILES -->
<script src="js/jquery.min.js?v=1"></script>
<script src="js/popper.min.js?v=1"></script>
<script src="js/bootstrap.min.js?v=1"></script>
<!-- ALL PLUGINS -->
<script src="js/jquery.magnific-popup.min.js?v=1"></script>
<!-- pogo slider jq-->
<script src="js/jquery.pogo-slider.min.js?v=1"></script>
<!-- slider js-->
<script src="js/slider-index.js?v=1"></script>
<!--<script src="js/smoothscroll.js?v=1"></script>-->
<script src="js/form-validator.min.js?v=1"></script>
<!--form removed-->
<!--<script src="js/contact-form-script.js"></script>-->
<script src="js/isotope.min.js?v=1"></script>
<script src="js/images-loded.min.js?v=1"></script>
<script src="js/custom.js?v=1"></script>
<script>
/* counter js */
(function ($) {
$.fn.countTo = function (options) {
options = options || {};
return $(this).each(function () {
// set options for current element
var settings = $.extend({}, $.fn.countTo.defaults, {
from: $(this).data('from'),
to: $(this).data('to'),
speed: $(this).data('speed'),
refreshInterval: $(this).data('refresh-interval'),
decimals: $(this).data('decimals')
}, options);
// how many times to update the value, and how much to increment the value on each update
var loops = Math.ceil(settings.speed / settings.refreshInterval),
increment = (settings.to - settings.from) / loops;
// references & variables that will change with each update
var self = this,
$self = $(this),
loopCount = 0,
value = settings.from,
data = $self.data('countTo') || {};
$self.data('countTo', data);
// if an existing interval can be found, clear it first
if (data.interval) {
clearInterval(data.interval);
}
data.interval = setInterval(updateTimer, settings.refreshInterval);
// initialize the element with the starting value
render(value);
function updateTimer() {
value += increment;
loopCount++;
render(value);
if (typeof (settings.onUpdate) == 'function') {
settings.onUpdate.call(self, value);
}
if (loopCount >= loops) {
// remove the interval
$self.removeData('countTo');
clearInterval(data.interval);
value = settings.to;
if (typeof (settings.onComplete) == 'function') {
settings.onComplete.call(self, value);
}
}
}
function render(value) {
var formattedValue = settings.formatter.call(self, value, settings);
$self.html(formattedValue);
}
});
};
$.fn.countTo.defaults = {
from: 0, // the number the element should start at
to: 0, // the number the element should end at
speed: 1000, // how long it should take to count between the target numbers
refreshInterval: 100, // how often the element should be updated
decimals: 0, // the number of decimal places to show
formatter: formatter, // handler for formatting the value before rendering
onUpdate: null, // callback method for every time the element is updated
onComplete: null // callback method for when the element finishes updating
};
function formatter(value, settings) {
return value.toFixed(settings.decimals);
}
}(jQuery));
jQuery(function ($) {
// custom formatting example
$('.count-number').data('countToOptions', {
formatter: function (value, options) {
return value.toFixed(options.decimals).replace(/\B(?=(?:\d{3})+(?!\d))/g, ',');
}
});
// start all the timers
$('.timer').each(count);
function count(options) {
var $this = $(this);
options = $.extend({}, options || {}, $this.data('countToOptions') || {});
$this.countTo(options);
}
});
</script>
</body>
</html>