I think most of us are familiar with filtering posts based on categories using ajax. But, if you still want to check out the way to code for filtering the posts continue reading this article.
Views: 5281
I think most of us are familiar with filtering posts based on categories using ajax. But, if you still want to check out the way to code for filtering the posts continue reading this article.
Views: 5281
Do you want to open all the external links of your website in a new tab ? If you say ‘YES“, just copy the following code and paste it in your function.php file.
Views: 24
To open all the pdf’s in a new tab we shall write jQuery Script that sets the target=”_blank” for all .pdf extension in an anchor.
Views: 16
Sometimes, it is handy to use jQuery to highlight the current menu. And for such cases you can write script that automatically add active class to the current menu:
jQuery('a[href*="'+window.location.href+'"]').addClass('current-menu');
If the menu to be highlighted is inside the container with class for eg. ‘main-nav’, then it would be good to add ‘.main-nav’ on the selector.
jQuery('.main-nav a[href*="'+window.location.href+'"]').addClass('current-menu');
Views: 7