inactive toggle being released

I am facing an issue with my two slider menus, where only the right menu holds the active value when clicked. The left menu slides out only when the toggle button is held down, but I need it to slide out when the toggle is simply clicked and not held down.

$('.leftToggle').on('click', function(e) {
  $(".sidebarleft").toggleClass("sidebarleftactive");
});
.sidebarleft {
  position: absolute;
  padding-top: 0px;
  left: auto;
  top: 7vw;
  height: 80%;
  right: 25%;
  width: calc(50% + 20px);
  background-color: #2E3192;
  border-color: #2E3192;
  border-style: solid;
  border-width: 5px;
  padding-right: 20px;
  padding-left: 5px;
  -webkit-transition: all 1s;
}
.sidebarleft:active {
  right: 70%;
  width: 25%;
  overflow: hidden;
}
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<div class="sidebarleft" id="sideleft">
  <div class="lefttext">
    <div class="leftTitle">title</div>

    <div class="leftToggle">+</div>

    <div class="leftSubHead">subheading</div>

    <div class="leftInformation">
      <br />

      <div>
        <br>text
        <br />
        <form></form>
      </div>
    </div>
  </div>
</div>

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

What is the method to modify the color of the final letter within an element?

Is it possible to make the last letter of a word appear red using CSS? <asp:Label ID="QuestionText" runat="server" CssClass="asterisk"></asp:Label> .asterisk:after { color: Red; content: " *"; } The challenge arises from the fact tha ...

Nested tables in Datatables retrieving child table rows based on parent table

I have been struggling for the past three days to get my nested Datatables working properly. I have a parent table called MAINtable and a child table called adjlinesTable. The issue I am facing is that all lines from the adjlinesTable are being drawn to ...

I need to know how to send a "put" request using JavaScript and Ajax

My task involves programmatically updating a spreadsheet using my code. I am able to write to a specific cell within the spreadsheet with the following function: function update(){ jQuery.ajax({ type: 'PUT', ...

Dynamic content causing the img src value to remain unchanged

Inspect the code provided below. My goal is to show an image in real time when an image file is selected. The code snippet I have currently is functioning properly, but I am encountering a roadblock on this particular line $(".hpicFile").closest( ...

Utilizing Javascript to Extract Data from Twitter Json Files

Can someone provide assistance with parsing JSON feed text retrieved from Twitter? I am looking to access and apply style tags to elements like the link, created date, and other information. Any tips on how I can achieve this task successfully would be g ...

Utilize a function to send an AJAX email

In my JavaScript function, I have been attempting to send an email from a contact form. The validation checks are working correctly, but when the code reaches the point of sending the form, it gets stuck and doesn't receive any response from $.ajax. I ...

Issues with fetching data from a Drupal module using an Ajax call

I have created a custom module in Drupal where the .js file is supposed to make an ajax call to a .module file. However, I am facing issues as the ajax call is not functioning properly. Can someone please assist me with this? Below is my .js file: // Jqu ...

Is there a way to transform this Json array into a format that JQuery can interpret easily?

Having a bit of trouble with this issue. I'm not entirely sure how to get it working correctly. According to Firebug, the Json object (or possibly array) from my ajax request appears as follows: { "jsonResult": "[ {\"OrderInList\":1}, ...

Issues arises when trying to send an array of favorite items to a view using PHP and AJAX

Could you please assist me with sending this array of favorites to PHP using AJAX? I keep encountering a 403 forbidden error, even though the path seems correct. It's possible that I am missing something here, any guidance or help would be highly appr ...

Expand an image to its full dimensions when it is initially loaded

Currently, I am experimenting with placing images of bubbles randomly on a webpage. To create the illusion of the bubble expanding in size from nothing to its full scale, I have been using CSS and specifically the transform:scale(); property. However, my ...

What is the purpose of setting the image border to inline block?

When I added a span element as the circular border to my image, which is placed inside a span tag, I observed that the span tag was being pushed down. By giving the span a display:inline-block property, the issue was resolved. But why does this happen? ...

Looping CSS text animation with typing effect

I am struggling with a CSS code that types out text, but it only does so once and I need it to repeat infinitely. Despite adding animation-iteration-count: infinite;, it still doesn't work as intended. Another issue is that it slows down at the end. H ...

Enhance the "content switcher" code

I have been working on improving my "contenthandler" function. It currently changes different articles when I click different buttons, which I am satisfied with. However, I believe there may be a better approach to this and would appreciate any advice on h ...

Unexpected Behavior in Jquery If Statement

$('#myClick2').click(function () { var value = $(this).val(); If (value != 'on') { $.getJSON('message_center_getMessageLists.asp', {}, function (json) { ...

trigger jquery popup from server-side code (ASP.Net VB)

Within my code, I have created a div element which serves as a popup message: <div class="info message"> <h3>Informa&ccedil;&atilde;o</h3> <p>Mensagem informativa.</p> </div> In addition, ther ...

Showcasing Information Using AngularJS from a Json Array

My goal is to present data from a JSON array in a table using the code below. However, all the data is currently being shown in one row instead of each record appearing on separate rows with alternating colors - grey for even rows and white for odd rows. I ...

Internet Explorer 11 encountering a flaw with absolute positioning

In my web page, everything looks good in Google Chrome, Firefox, and Opera, but I'm facing an issue with Internet Explorer 11. Here is the simplified HTML: <div class="container"> <div class="page-content"> <div id="corner ...

What is the proper way to provide login information for a webservice through a jquery ajax request?

I've been attempting to make an AJAX call using jQuery like this: $.ajax({ url: WEBSERVICE_URL, type: "GET", dataType: "application/json; charset=utf-8", username: "admin", // Most SAP ...

Utilizing HTML5's geolocation API to construct a geofence

Is there a way to utilize the HTML5 geolocation API to determine if a user is located in a specific area? I'm considering setting a central latitude and longitude and creating a radius around it, so the site will function as long as the user is within ...

Steps for adding a border to kendo grid row hover

One of my tasks involved creating a grid using Kendo, and I wanted to display borders on a grid row when the cursor hovers over it. I attempted the following code snippet: .k-grid > table > tbody > tr:hover, .k-grid-content > table > tbody ...