Relative Content

Tag Archive for javascripthtmljquerycss

Animate collapse HTML+CSS

Im trying to animate the collapse content to show it smoothly, but idk how can i do it. I’ve tried some jquery selections to add a class with height transition but doesnt works. The collapse content does not animate smoothly when expanding or collapsing. I tried adding and removing classes with jQuery to handle the height transitions. I also attempted to use Bootstrap’s collapse events (show.bs.collapse and hidden.bs.collapse) to manage the transitions manually, but the content still doesn’t animate smoothly.

Enable CSS animation with jQuery when document width is greater than window width

I’m trying to enable a CSS animation on a component called #flexRepeater, only when the document width is greater than the window width. The end result will be a simple autoscroll / marquee effect when content overflows the viewport. This should not be dependent on user interaction, as this is meant for a large display screen.

Coloring values in table on the website with jQuery

I have a website where values are given in a table. I would like them to be colored based on the numbers. I used JavaScript code, but it seems to work correctly for <div> and <p>, but not correctly for <td>. What am I doing wrong?

jQuery Pointer over image (floor plan)

I try to place a marker over an image (floor plan) that will stick to that coordinates regardless if user zooms in or out, drags the image in zoom mode. I have tried but with little success to create a semi functional code that uses the click and touch events.
One can double click or double tap to add a marker over a floor plan and then should zoom or not the marker needs to remain in the same position. Imagine you want to have a marker where the light bulb should be, you add a marker at that exact position and then you can zoom the floor plan but the marker should remain where it was added, unless the user double taps / clicks once more.

How to focus on different sections of an image based on user scroll?

I have an image in which I am attempting to zoom the image to specific regions based on the user’s scroll.
When a user scrolls to divid=para2 and divid=para4, my code zooms in. At the end of the div, it zooms out. It functions properly, however I can’t seem to get the para4 to focus or zoom in on a different area of the picture. As the user goes to paragraphs 2 and 4, it appears that the graphics are now zooming at background-position: 72% 43%; (specified in CSS). How can I change the code such that when the user advances to paragraph 4, the image zooms to background-position: 12% 93%;? This is my code: