HTML5 responsive step-by-step customized product template
Brief Tutorial
This is an HTML5 responsive step-by-step customized product template made using jQuery and CSS3. Through this template, users can customize the products they need step by step. The final step will give you the price and description of the item.
How to use
HTML structure
The HTML structure of this template is divided into 3 parts: header.main-header is used as the top navigation, div.cd-builder- steps is used for product customization steps, and footer.cd-builder-footer is used for bottom navigation and some description information.
<div class="cd-product-builder"> <header class="main-header"> <h1>Product Builder</h1> <nav class="cd-builder-main-nav disabled"> <ul> <li class="active"><a href="#models">Models</a></li> <li><a href="#colors">Colors</a></li> <li><a href="#accessories">Accessories</a></li> <li><a href="#summary">Summary</a></li> </ul> </nav> </header> <div class="cd-builder-steps"> <ul> <li data-selection="models" class="active builder-step"> <section class="cd-step-content"> <header> <h1>Select Model</h1> <span class="steps-indicator">Step <b>1</b> of 4</span> </header> <a href="#0" class="cd-nugget-info">Article & Downaload</a> <ul class="models-list options-list cd-col-2"> <!-- models here --> </ul> </section> </li> <!-- additional content will be inserted using ajax --> </ul> </div> <footer class="cd-builder-footer disabled step-1"> <div class="selected-product"> <img src="img/product01_col01.jpg" alt="Product preview"> <div class="tot-price"> <span>Total</span> <span class="total">$<b>0</b></span> </div> </div> <nav class="cd-builder-secondary-nav"> <ul> <li class="next nav-item"> <ul> <li class="visible"><a href="#0">Colors</a></li> <li><a href="#0">Accessories</a></li> <li><a href="#0">Summary</a></li> <li class="buy"><a href="#0">Buy Now</a></li> </ul> </li> <li class="prev nav-item"> <ul> <li class="visible"><a href="#0">Models</a></li> <li><a href="#0">Models</a></li> <li><a href="#0">Colors</a></li> <li><a href="#0">Accessories</a></li> </ul> </li> </ul> </nav> <span class="alert">Please, select a model first!</span> </footer> </div>
CSS style
The interface CSS style is very simple. Just note that div.cd-builder-steps is used to wrap different customization steps. The sub-elements inside it are absolutely positioned. They Overlapping each other, the height and width are both 100%. They are hidden by default and will only be displayed when .activeclass is attached.
.cd-builder-steps > ul { height: 100%; overflow: hidden; } .cd-builder-steps .builder-step { position: absolute; z-index: 1; top: 0; left: 0; width: 100%; height: 100%; overflow: auto; visibility: hidden; transition: visibility .5s; } .cd-builder-steps .builder-step.active { position: relative; z-index: 2; visibility: visible; }
JavaScript
Create a ProductBuilder object in the JS code and use the bindEvents method to handle various events.
function ProductBuilder( element ) { this.element = element; this.stepsWrapper = this.element.children('.cd-builder-steps'); //... this.bindEvents(); } if( $('.cd-product-builder').length > 0 ) { $('.cd-product-builder').each(function(){ //create a productBuilder object for each .cd-product-builder new ProductBuilder($(this)); }); }
When the user selects a model, obtain new content through Ajax calls. Each list item in ul.models-list has a data-model attribute, which is exactly equal to the name of this new HTML page.
$.ajax({ type : "GET", dataType : "html", url : modelType+".html", beforeSend : function(){ self.loaded = false; }, success : function(data){ self.models.after(data); self.loaded = true; //... }, error : function(jqXHR, textStatus, errorThrown) { //... } });
The above is the content of HTML5 responsive step-by-step customized product template. For more related content, please pay attention to the PHP Chinese website (www.php.cn)!

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

Guide to Table Border in HTML. Here we discuss multiple ways for defining table-border with examples of the Table Border in HTML.

This is a guide to Nested Table in HTML. Here we discuss how to create a table within the table along with the respective examples.

Guide to HTML margin-left. Here we discuss a brief overview on HTML margin-left and its Examples along with its Code Implementation.

Guide to HTML Table Layout. Here we discuss the Values of HTML Table Layout along with the examples and outputs n detail.

Guide to HTML Input Placeholder. Here we discuss the Examples of HTML Input Placeholder along with the codes and outputs.

Guide to the HTML Ordered List. Here we also discuss introduction of HTML Ordered list and types along with their example respectively

Guide to Moving Text in HTML. Here we discuss an introduction, how marquee tag work with syntax and examples to implement.

Guide to HTML onclick Button. Here we discuss their introduction, working, examples and onclick Event in various events respectively.
