There is a Contact Form 7 on the webpage that I want to make fixed to the right side. Initially, the form is hidden and only the form button (open) is visible. When clicked, the form should open.
There is a Contact Form 7 on the webpage that I want to make fixed to the right side. Initially, the form is hidden and only the form button (open) is visible. When clicked, the form should open.
Your custom element:
<div onClick="toggleForm()" id="myForm">click here</div>
Custom styling:
<style>
#myForm{
background: blue;
width: 150px;
height: 150px;
position: fixed;
top: 20px;
right: -100px;
cursor: hand;
cursor: pointer;
}
</style>
Javascript code to open/close the form:
<script>
var isOpen;
function toggleForm(){
if(isOpen){
document.getElementById('myForm').style.right='0px';
document.getElementById('myForm').innerHTML = 'close';
isOpen=false;
}
else{
document.getElementById('myForm').style.right='-100px';
document.getElementById('myForm').innerHTML = 'click here';
isOpen=true;
}
}
</script>
I have created a voting system and I am facing an issue with the data updating. I have implemented a setInterval function in javascript to load the data every 2 seconds, but it's not working as expected. There are no errors shown, but the data is not ...
I have a specific requirement: I want to display a modal popup window based on a for loop using jQuery. I have attempted the following approach, where I want the modal popup to be displayed based on the value of a flag. For example, if the Flag value is 3, ...
HTML: <p class="greeting"> hello, my name is kevin. what's yours? </p> jQuery: $("p.greeting").filter(function (){ return $this.text() === "my name is"; }).css("background", "green"); I am attempting to find and highlight the phra ...
Hello, I need assistance with base authentication while making an AJAX get/post request to a Python BaseHTTPServer. I managed to modify some lines of code in the Python script to send CORS headers. It works perfectly in modern browsers when I disable HTTP ...
If I click on the edit button, I expect to see data populated in a form within a Bootstrap modal using jQuery AJAX method. Here is the image for the edit modal: https://i.stack.imgur.com/LXGo0.png This snippet is for the home page: <?php require_ ...
Recently, I have encountered an issue with a button on my webpage. Every time the button is clicked, the onclick code executes and then the page refreshes. This was not a problem before, but now it seems to be automatically refreshing the page. The curren ...
Looking to implement a feature where a different background image is displayed randomly upon page visit or refresh. Currently, specifying the images in an array like the example below works well, but I want to be able to pull from a folder. $(document).r ...
In my application, there is an input box that allows users to enter a string date like "today" or "tomorrow". However, I am facing a new challenge now - dates such as "3 march" or "8 january." The input box includes a dropdown menu feature where users can ...
I'm currently working on a responsive website, and I have encountered an issue with a dropdown menu. When the browser size is reduced to 900px, the menu shifts all the way to the left side. To address this, I added some left padding to keep it off the ...
Currently, I am working with a jQuery validator and I am attempting to utilize the ignore: ':hidden:not feature for all controls that contain an ID with " selecting" in it. Here is my current code snippet: sb.AppendLine(@" ignore: ':hidden: ...
I'm currently working on a basic modeling application for the web. The main component of my app is a canvas element that I'm trying to size correctly. However, when I set the height and width using CSS, it scales the entire canvas and compromises ...
Looking for help with the following HTML: <button name="darkBlue" onclick="setThemeColor(this.name)">Blue</button> <button name="black" onclick="setThemeColor(this.name)">Black</button> I'm interested in replacing the text on ...
I am currently working on creating a dynamic range of values for a select box using ajax and jquery. The first dropdown menu has options that will interact with a second dropdown containing a range of numbers. While I know how to set the value of a single ...
I am attempting to retrieve JSON data value and only display the element if the data is present. However, I am experiencing issues with Handlebar JS. var data = { listBank: [ { "enableSavedCards":"false", "enableAxisAccount":"t ...
I am currently working on a project that involves dynamically populating two drop down menus using SQL Server. Depending on the selected items, I need to load a specific ejs template using AJAX. My goal is to load data based on the selected criteria. For e ...
Customizing CSS Styles On my website, I have two different classes: menu and leftside. Both classes include the ul and li elements. However, when I try to use ul and li in the left side as well, they end up matching with the styles of the menu ul and li. ...
My div elements are arranged from top to bottom, and when one selected div is removed or faded out, all other divs below it shift up suddenly to fill the gap. While this behavior is functional, I would prefer to slow down the movement of the divs shifting ...
I'm in the process of incorporating a timeout or reset into this section of jQuery code. <script type="text/javascript> var $msgNav = $('.nav4'); $msgNav.on('click', handler); function handler() { $('.drop_down_ ...
Encountering an issue with my project involving a timetable that allows for dynamically adding rows with Jquery. The following are the codes: <?php session_start(); ?> <html lang="es"> <head> <meta charset="iso-8859-1"> ...
I am attempting to use jQuery to detect when the user refreshes the page in order to redirect, but I can't seem to get it working. Can someone help me figure out what is wrong with this code? <?php include 'instagram.php'; ?> <! ...