Tag: css

How to select a div with specific css property

//style .TemplateBox1{display:none;} //Html <div class=”TemplateBox1″ id=”9″> 1 </div> <div class=”TemplateBox1″ id=”10″> 2 </div> <div class=”TemplateBox1″ id=”11″> 3 </div> //jQuery $(‘div’, this).each(function (e) { //Do something }); This is a part from my code, at start the divs display (CSSproperty) is none (not shown) and after the user click on a certain button the property of […]

How can I do this trick with css and/or javascript?

This is the code: HTML: <img src=”…” /> // other stuff <div id=”image”> <a href=”” > bla bla bla </a> <a href=”” > ble ble ble </a> </div> CSS: #image a:hover{color:green;} I want this: When the user put mouse over the image, then all the links in the div with id “image” become green ( […]

How to hover mutiple “div” in the same time?

I have <div id=”d1″ class=”hov”></div> and <div id=”d2″ class=”hov”></div> and the CSS is .hov:hover{ background-color:#cde0c4; cursor:pointer; } When I hover on d1 I want d2 is hover same. How to hover multiple DIVs at the same time?

Smooth css change transitions

I’ve setup a jQuery function that changes the body background colour when a certain div comes into view, e.g. the body background colour is black, when #block-three (that contains black text), the body background colour changes to white, and changes back when this goes out of view. This works fine, it’s just very sudden though, […]

Is there a way to move an element outside of it's parent with jquery?

My structure is this html: <div class=”aside_listings”> <div> <div> <!–a bunch of content–> </div> </div> <div class=”toolbar search_options”> <!–a bunch more content–> </div> </div> CSS .aside_listings { height: 483px; width: 440px; overflow-y: scroll; overflow-x: hidden; margin-top: 24px; } so the above code is working the way it’s needed to, I need a scroll page because […]

jQuery hover isn't functioning after divs are reloaded

I have a function that creates a grid of divs that are generated and sent to a container div when the document loads. When one hovers over the divs, they highlight (change color). I have another function that resets the grid, allowing the user to specify the size of the grid. It’s supposed to remove […]

Jquery fade only one item of a class in

I just tried making a script that fades in a tooltip when you hover a link, image etc.. Everything works fine except the actual fading in of only one tooltip at a time. If it was not clear what i mean: I want to hover an image and show a tooltip right above the image, […]

How to add random number id inside div class

This question already has an answer here: Randomize numbers with jQuery? 6 answers

How to keep font size always 150% after page refresh or open page again?

I’ve create two button which allow users to change the font size of texts in my webpage.It’s work nice, but after refresh or reopen the page the font size always back to the normal size. So how to keep font size always 150% after page refresh or reopen? Here is my jQuery code: $(document).ready(function() { […]

Bootstrap Sidebar menu and Sidebar navigation

I’m using bootstrap and it just happen that I wanted to create a responsive website that’s why push me through to use bootstrap. What I want to do is something like on the photo. (NOTE: not the entire page but only the sidebar with the icons.) That’s exactly what I want on my sidebar. I’d […]