jquery div hide show not working in wordpress
jQuery(document).ready(function($) {
$('#menu-links li a').click(function() {
//fetch the class of the clicked item
var clickedClass = $(this).attr('class');
//reset the active class on all the buttons
$('#menu-links li').removeClass('active');
//update the state on the clicked button
$(this).parent().addClass('active');
if (clickedClass == 'all') {
// show all our items
$('#menu-items').children('div.col-md-4').show();
} else {
//hide all elements that don't share clickedClass
$('#menu-items').children('div:not(.' + clickedClass + ')').hide();
//show all elements that do share clickedClass
$('#menu-items').children('div(.' + clickedClass + ')').show();
}
return false;
});
});
Also in JavaScript:
- reverse words javascript
- javascript urlencode json
- how to call function on every keypress in jquery
- pdf to image javascript
- javascript remove final newline from string
- how to read if a person has send a message on discord.js
- vue js get routes
- datatable dropdown toggle not working
- remove a class after 100 milliseconds jquery
- godot get root node
- iterate over enum angular ngfor
- how to use a js class in react
- react spring
- angular viewchild set attribute
- javascript random()
- jquery option selected
- js validate email
- react make an ascending descending button
- how to push string into array in javascript
- js random id
- straforma in string js
- javascript console mensaje
- javascript redirect example
- javascript set padding left?