Remove class
-
Hey,
I need help modifying the plugin.The plug-in works as needed after throwing shortcod [wpcm_cars] – it shows all the cars added in the database.
In the listing I added a new class .hide for which I gave the CSS display: none; – The listing has stopped showing at the start.
And now I added the following code:
Before modification:
<input type = “submit” value = “<? Php esc_attr_e (‘Show Results’, ‘wp-car-manager’);?>” />
After modification:
<input type=”submit” onclick=”myFunction()” value=”<? Php esc_attr_e (‘Show Results’, ‘wp-car-manager’);?>” />Java Script:
<script>
function myFunction() {
var element = document.getElementById(“myDIV”);
element.classList.remove(“hide”);
}
</script>I can see in FireBug that the class at the time of the click is removed but after a while it is added again.
Can you help me somehow?
- The topic ‘Remove class’ is closed to new replies.