Skip to content

Tag: html

Jquery ajax usage for object

I was trying to complete project on fcc.Didn’t know how to add quotes in html.Looked up in their premade project found this piece.Can someone explain what is going on in this code? Answer It’s a hack to get around an incorrect Content-Type. gist.githubusercontent.com isn’t designed to host J…

why do these similiar functions not work?

I have some divs and if i hover them I want an popup to show. I have six divs and six popups to show but not all at once instead only one per one. The first function works fine but then the other do not work how can I move them all to one snippet? Answer okay so actually i

target child div of ID in JavaScript and CSS

I’m having difficulty targeting the child div of id=”videoContainer” and changing its style Answer You can use querySelector with the direct child operator > (and maybe first with :first-child if you have more than one child div) like this: object-fit: contain will force you video to scal…

How to make the FAQ accordion toggle?

I’m trying to make an FAQ accordion and I want it to have two main features: 1- one question and answer can be seen at a time (I managed to do that) 2- if toggling on the open question it closes, and vice-versa (that’s what i’m struggling with) Here’s a pen that has a small copy of wha…

how do I make elements not move when other elements do?

i have some image elements that when hovered on, scale up, however, this causes some other elements to move, which i dont want happening. I have tried things like float: right which work, but dont fit for my website, since it’s margined and centered. here is a simpled version of my site: Answer Use tran…