ADVERTISEMENT


Breaking News

Recent Posts

Showing posts with label javascript. Show all posts
Showing posts with label javascript. Show all posts

Sunday, September 27, 2015

How to add Youtube loading bar on your site

How Youtube stacking bar on top of their feature pages, it demonstrates page is stacking and which really looks really cool. Today I will demonstrat to you how you can rapidly include Youtube like advancement bar our site.

Go to Github and download nprogress Javascript plugin or simply indicate nprogress CDN here, it is especially made for Ajax web application yet you can different things with it as well.

Everything we need is nprogress.js and nprogress.css from the repo.

Step 1:
Add nprogress.js and nprogress.css 
 <script src='https://cdnjs.cloudflare.com/ajax/libs/nprogress/0.2.0/nprogress.min.js'></script>  
 <link rel='stylesheet' href='ttps://cdnjs.cloudflare.com/ajax/libs/nprogress/0.2.0/nprogress.min.css'/>  

Step 2

Nprogress offers two methods NProgress.start() and NProgress.done(), we will incorporate them with DOM document.readyState property, it tells us the loading status of the current document. That’s it! Just put the following code at the bottom of your page but before tag and you should see it in action.

 //Page is loading start progress  
 document.onreadystatechange = function () {  
  if (document.readyState == "interactive") {  
   NProgress.start(); //start progress bar  
  }  
 }  
 //when page is loaded stop progress   
 var everythingLoaded = setInterval(function() {  
  if (/loaded|complete/.test(document.readyState)) {  
   clearInterval(everythingLoaded);  
   setTimeout(function(){NProgress.done()},2000);  
  }  
 }, 10);  

jQuery version

 $(document).ready(function() {  
   NProgress.start();  
 });  
 $(window).load(function() {  
   //setTimout() for 2 seconds progress stop delay  
   setTimeout(function(){NProgress.done()},2000);  
 });  


Usage 
Method for using is so simple when page load just use NProgress.start() and when page loading id complete just done it with NProgress.done()
Read more ...

Thursday, June 26, 2014

10 Easy jQuery Drag and Drop Plugins

This post gives you 10 jQuery Drag and Drop Plugins (you may have not used before) that will give the poser to add Drag N’ Drop capabilities to your frontend. Take note though that some may still be beta/development or not fully maintained by the authors. Enjoy!
Related Posts:
Update 19/05/2013: Found a cool drag/drop/filter plugin called jQuery.Shapeshift.

1. Drag n Drop Scattered Gallery

Drag and drop gallery script with various look and feel options.

2. (mb)ImgNavigator

A photogallery for viewing very large images using a navigator map and drag. You can drag your large image in the display by the navigator or the image itself.

3. jQuery List DragSort

A lightweight jQuery plugin that provides the ability to sort lists using drag and drop.

4. Ajax Upload; A file upload script with progress-bar, drag-and-drop

This plugin uses XHR for uploading multiple files with progress-bar.

5. Drop n’ Save – Drag & Drop Uploader

This unique drop and save application allows you to add this facility to your website, today and with minimum hassle.

6. (mb)ConteinersPlus

This is a useful plug in to build full featured and fully skinnable containers. The container can be set to draggable, resizable, collapsible and minimizable

7. jQuery Drag Expose | Draggable Image Gallery

Show your photos in a different way – Let the user drag & drop them to slide the gallery!

8. Dynamic Drag’n Drop With jQuery And PHP

Drag’n drop generally looks hard-to-apply but it is definitely not by using JavaScript frameworks. Here is, how it is done by using jQuery & jQuery UI

9. Collidable Draggables

Adds collision detection to draggable objects.

10. NestedSortable

Is an extension to the original Sortable from the Interface plugin that allows you to both sort vertically and nest (make one item a child of other item) elements at the same time, using drag-and-drop.
Read more ...
Designed By Published.. Blogger Templates