Creating sites with semantic HTML and lots of CSS is currently the more preferred way for web developer and html css developer in every good web development company . But with each new page in a design, the use of CSS by the HTML CSS developer increases and more and more elements and styles are added in the process.
Building a versatile slideshow using JavaScript:
A lot of sites today make use of a slideshow - simply listing of images - so the work of the JavaScript programmer is made easy.
Another concept is to only show one image at a time . The only code the JavaScript developer needs to start the slideshow is an tag. In this the other images can be loaded dynamically via either a per-page JavaScript array, or via AJAX.
Slideshow plugin:
A jQuery has a chainable interface and this is something the plugin must implement. And to avoid any conflicts, the JavaScript programmer must set up any variables which are local to the plugin and should be used on each collection item. It is also a good practice to cache any calls made to jQuery, since this reduces wasted DOM calls. This can improve the speed of JavaScript code and makes the code reusable in the long run.
Deciding on defaults:
As a standard practice for setting up and choosing defaults, if all the slideshows should auto-play, then don’t keep this as an option. Instead make the option to stop and auto-play. This is is followed by a lot of content/image heavy portal or video sites. Similarly, if every slideshow should have previous/next functionality then make this the default and expose the ability to remove them with a class such as “no-pagination.”
Grab your images:
If the JavaScript developer is using AJAX to load images in the slideshow, then the JavaScript developer can speed up development by deciding on and keeping a standard folder structure and naming convention.
|