August 19, 2014

How to make smooth scroll to top and visible on scroll?

Smooth scroll to top

Scroll down to make the scroll to top button appear. On click of it the page scrolls smoothly to the top of the page. The scroll will be visible only after a page scroll.

How to hide/fade div on scroll down?

How to hide/fade div on scroll down

This is really an interesting one. When the you scroll down you can hide an element (div/image/etc.) This is used when you need to hide the scroll down button when you scroll down the page and make the scroll to top button appear.

August 15, 2014

How to make the menu collapse when it is clicked in mobile view in Bootstrap 3?

How to make the menu collapse when it is clicked in mobile view in Bootstrap 3?

By default menu doesn't close when you select from a menu in a mobile view. It still stays when the menu is clicked and the page loads. I was trying my blog in my mobile. Then i found the solution for it. We can either use jQuery or directly use html codes. I will teach you both the ways.

Simple CSS spinners - pure CSS and HTML

Simple CSS spinners

I say CSS Spinners should be light weight and beautiful if you use the spinner for loading the page at the start. Because it is the starting thing your viewer friends might look at and the page loading should be faster too. So lets learn how to do this purely with CSS and HTML (no JavaScript).

August 4, 2014

Call Javascript function on pressing ‘Enter’ key

In most of the pages you might have noticed how you can type your queries into the search box and search by pressing the enter key instead of having to click the ‘Search’ button present in the page.

Coding

<input type="text" onKeydown="Javascript: if (event.keyCode==13) Search();">

<input type="button" value="Search" onClick="Search();">

The onClick event of the Search button calls a javascript function named Search(). To have the same function called on pressing the enter key when the cursor is in the text box, we check if the keycode is 13 and subsequently call the Search() function.

Popular Posts

Views