jQuery

Lesson 6. Displaying a list of posts on a page and pagination
Lesson 6. Displaying a list of posts on a page and pagination

Today’s article concludes the series of lessons on developing an autocomplete plugin. Due to the plugin's functionality expansion, many changes have been made. So we’ll need to go through the code from the very beginning again, but without too many details. In short, two additional shortcodes have been added for more flexible output manipulation. One shortcode displays the list of posts, the other — the pagination.

read more...

How to make a to-top button with smooth scrolling
How to make a to-top button with smooth scrolling

Hello! In today’s lesson, we’ll look at how to implement a simple “scroll to top” button using HTML, jQuery, and CSS.

As always, we start with the HTML code. Today’s structure is very basic:

<div class="to-top" data-btn="toTop">
	&#10145;
</div>

Where:
to-top — the class we’ll use to style the button
data-btn="toTop" — a data attribute we’ll use to track scroll and click events (yes, we could use the class instead, but in this case we’ll use the data attribute)

read more...