I am using the HTML5 audio tag on a website I’m maintaining. I noticed that the audio tag has a download icon embedded in it. How do I remove that option? I want the audio to be read (playback) only. Is there a way to do this without JavaScript or jQuery? I don’t know either one yet. Answer Try this
Tag: html
Show button whose value is present in database else hide the button
I have 5 columns in database id, a1, b1, c1 and d1. I want to show button a if the value in database for a1 is not there and if two values eg. c1 and b1 is present in database i want to show buttons for a and d. Simple thing I want to show the button for that if
Change only one property of css background
I’m currently trying to dynamically change the background gradient of a background with an image. I’m using the following CSS properties to add the image and the gradient. CSS: The code here is pretty much the same with the only exceptions being the cross-browser compatibility. The only thing I would need to change would be the actuall color of the
Set div to hidden, then visible after time delay
I’m trying to have a yellow square appear on a black background after X amount of time (perhaps even after a random amount of time, but for now let’s just do fixed time). This code should hide the yellow square initially, then reveal it after 2 seconds. But it does not work. It also does not work when I try
Is there a way to detect horizontal scroll only without triggering a browser reflow
You can detect a browser scroll event on an arbitrary element with: I would like to be able to differentiate between vertical scrolling and horizontal scrolling and execute actions for them independently. I’m currently doing this by stashing the values of element.scrollTop, and element.scrollLeft, and then comparing them inside the event listener. E.g. This works fine, however from https://gist.github.com/paulirish/5d52fb081b3570c81e3a I
How to move form from center to right
I am working on this login/signup form on CodeIgniter. Got this login/signup code from the internet, but by default, it is in the center. So how do I move this form to the right side of the page? enter image description here Login.html Style.css index.js Answer add float: right to your content. In your css change form class as below
how to prevent ONBLUR event when keypress or enter?
I have used two events KEYPRESS AND ONBLUR in my input field, when the ENTER key pressed, it triggers KEYPRESS and ONBLUR as well. Code: fiddle Note: I need to handle keypress as well onblur event, But i need only one event should be triggered at a time. For example: When I press enter key, myFunction should be triggered. Not
How to hide tooltips using JavaScript (not jQuery)
I created my tooltips using this website: http://www.w3schools.com/howto/howto_css_tooltip.asp Now I’m wondering how would I close the tooltip after an arbitrary amount of time using a vanilla javascript solution. My solution so far: I understand why this is not working but I’m unable to see a solution. I could iterate through the NodeList that getElementsByClassName returns and hide each individual one
Regex to allow only numbers and decimals not working in Javascript
I am trying this below code and the regex isn’t working and it is allowing all the characters in the input box. Desired: Input text box should not accept any other character other than numbers and decimal point. Answer Here’s an alternative way. I’m using the oninput event that is triggered on every value change by user (not only key
Multiple contentEditable, unable to move carret to end of span with arrow keys
I have multiple spans with content editable property set to true, like this: https://jsfiddle.net/du7g39cz/ Problem is that when I am using arrow keys to navigate around span element, I can not reach end of individual span as blur event gets called when caret reaches last symbol. I can reproduce this behavior on all browsers apart MS Edge. I must note