Wednesday 21 June 2017

only JavaScript Image slider

javaScript image slider


Hi friends , i am your friend manoj chauhan . Today discussion is how to create image slider using html , css and javascript only.  we know mostly website use image slider to create attractive and inter-attractive website.

This is a main part of websites every designer know that things that's reason i told you how to create image slider in simple coding.



<body>
<img src="image source" id="social" onclick="change()">
</body>

<script>
var image_tracker='v';                                                           // v  is image name first latter
function change(){                                                               // function use for a
var image = document.getElementById('social');                   // image id call in function

if(image_tracker =='v'){                                            // i used if function for multile possibility in function
                                                                               //  image name first latter v is not found then second call
image.src='hair.jpg';                                                  // second image call in function
image_tracker ='h';                                                    // same process in function again
}else
{
image.src ='vector.png';
image_tracker='v';


}

}

setInterval("change()",3000)                                //   used for mutiple time function call

</script>

 This code using you definitely  create cool image slider.......

i also create this video for your help to easily understand how this code working.


Friday 9 June 2017

HTML Related Questions....

  1. IF i use one id selector in twice element what happen code is working and not.

The text editor lets me use the exact same ID tag more than once and when I give specific attributes to that particular ID tag in the CSS file, all the elements with that one ID change. Doesn't this make the functionality of ID exactly the same as the functionality of class? 

 2.  Does a hyperlink apply only to text?

No. The hyperlinks can be applied to both text as well as the images.
- It means that even the images can become clickable links with a capability to take the visitor to the next page.
- This can be done simply by using <a href> tag. 

3. What are empty HTML elements?

HTML elements with no content are called empty elements. ex- <br/>

 

4. What is difference between HTML and XHTML?

html and Xhtml difference:-

1. HTML is application of Standard Generalized Markup Language(SGML) whereas XML is application of Extensible Markup Language(XML).
2. HTML is a static Web Page whereas XHTML is dynamic Web Page.
3. HTML allows programmer to perform changes in the tags and use attribute minimization whereas XHTML when user need a new markup tag then user can define it in this.

4. HTML is about displaying information whereas XHTML is about describing the information.