Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9150543
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T11:37:30+00:00 2026-06-17T11:37:30+00:00

Hey guys I have the following: $(.views).click(function() { $(this).(.views).show(); }); $(.closeviews).click(function () { $(this).(.closeviews).hide();

  • 0

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 🙂

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T11:37:31+00:00Added an answer on June 17, 2026 at 11:37 am

    Demo

    HTML:

    <ul class='viewstable'>
      <li>Sample</li>
      <li>Sample 2</li>
    </ul>
    
    <input type='button' value='View Your Employees' class='views' name='views' /> 
    <input type='button' value='Close' class='closeviews' name='closeviews' />
    

    JS:

    $(function () {
      $(".views").click(function () {
        $('.viewstable').show();
      });
    
      $(".closeviews").click(function () {
        $('.viewstable').hide();
      });
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

hey guys, i did the following function in order to have the same height
Hey Guys, i have created the following Menu Structure: <div id=menu> <ul> <li><a href=#>Main
Hey guys I have the following layout: <table> <tr> <td> <div> I´m bigger than
Hey guys, I have the following HTML structure that I am trying to pull
Hey you guys (and girls), I have implemented the following CSS: #tab-navigation ul li:last-child
Hey guys, I have a problem with the following table: CREATE TABLE [dbo].[CA]( [Id]
Hey guys. I have the following situation. I want to use a TypeDescriptor to
Hey guys, I want to make a function loop over all elements that have
Hey guys i have another question about dojo. This time it has to do
Hey guys. I have the following models: Category Event Lock Item Site User Events

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.