Hey guys I have the following:
$(".views").click(function() {
$(this).(".views").show();
});
$(".closeviews").click(function () {
$(this).(".closeviews").hide();
});
This will open up a list based on which view list they want to look at, for some reason it’s telling me Uncaught SyntaxError: Unexpected token (
Once I remove the (this). it goes away, so I am kinda confused as to why it is telling me that.
EDIT:
I changed to this:
$(".views").click(function() {
$(this).find(".views").show()
});
$(".closeviews").click(function () {
$(this).find(".closeviews").hide()
});
Does nothing, if I go to the view list above it opens this one and that one.
UDATE:
HTML:
The one I am trying to open with the above script –
<input type='button' value='View Your Employees' class='views' name='views' />
<input type='button' value='Close' class='closeviews' name='closeviews' />
The one I click above this one, opens the above plus this one:
Script:
$(".notempl").click(function () {
$(".notempltable").show();
});
$(".closenotempl").click(function () {
$(".notempltable").hide();
});
HTML:
<input type='button' value='View Employees' class='notempl' name='notempl' />
<input type='button' value='Close' class='closenotempl' name='closenotempl' />
UPDATE:
Hey guys thanks for all the help, got it sorted out. I actually was telling the wrong thing to show and hide. Each list is populated by a PDO statement and a table so I needed to show the table, hide the table not the button.
Thanks guys 🙂
Demo
HTML:
JS: