Skip to content
Advertisement

Tag: html

Lazy Loading HTML5 picture element

I have been searching (unsuccessfully) for a reliable method to lazy load images while using the HTML5 spec for <picture>. Most solutions/plugins out there currently rely on using data- attributes. I could be wrong, but it doesn’t seem this method will work in conjunction w/ <picture>. I’m really just looking to be pointed in the right direction. If anyone has

Use HTML5 to resize an image before upload

I have found a few different posts and even questions on stackoverflow answering this question. I am basically implementing this same thing as this post. So here is my issue. When I upload the photo, I also need to submit the rest of the form. Here is my html: Previously, I did not need to resize the image, so my

How can I copy rich text contents to the clipboard with JavaScript?

Premise I need help copying rich text to the clipboard using JavaScript. I have searched around and haven’t found anything to suit my specific needs. Code Problem The aforementioned code isn’t working and is resulting in an object expected error. Any help is appreciated! I have seen a library out there called zeroclipboard, but would prefer to write my own

Use tinymce editor only once textarea

I am using tinymce editor and i have 4 textarea in my form when i use tinymce change all my textarea to editor but i want change only one my textarea to editor. it’s my tinymce code: how can do it? thank you Answer Read this article in the TinyMCE manual. Use mode either with specific_textareas or exact. Your initialisation

Hide/Show image after 2 seconds

So I need to have an image alternatively appear and disappear every 2 seconds, I’ve been trying using javascript and I’ve gotten stuck, I feel like it’s something so simple but i can’t work it out, any help is appreciated. HTML JAVASCRIPT Answer You need to use callback functions in your setInterval. I changed your JavaScript to this: here is

Check if my website is open in another tab

I want to check with JavaScript if the user has already opened my website in another tab in their browser. It seems I cannot do that with pagevisibility… The only way I see is to use WebSocket based on a session cookie, and check if the client has more than one socket. But by this way, from current tab, I

Scroll animation doesn’t work on IE and Mozilla

I have an element that fills the screen, under that is another element but this one is hidden so you can’t scroll to it manually. My CSS stylesheet looks like this for that: #page1 stands for the element that fills the screen and #content stands for the element which is underneath that. When I click on a button on the

Advertisement