/ home / jquery / jquery set css property of target /

JQuery Set CSS property of Target

12:51 am, July 13, 2016 352 122 0.6 @ 200 wpmrate up KruXoR
2

Using jquery to search for text of a div target and changing the font weight to bold. Good if you have something you need to change and cant access the code so you have to override with jquery.

$("#adiv li a:contains(some text)").css("font-weight","bold");

<div id='adiv'>
<li>
<a href='#'>a link</a>
</li>
<li>
<a href='#'>another link</a>
</li>
<li>
<a href='#'>some text</a>
</li>
</div>
12:51 am, July 13, 2016 352 122

Comments

Reports

Add Report

Report's

KruXoR

This is a site where i basically just post whatever i feel like at the time, it has no one particular topic but usually. Just my ideas and links and random bits of code that i find.

Follow Me..

@KruXoR

Minecraft

Looking for the kruxor minecraft server mc.kruxor.com? we have migrated it to... icekraft.com if you want to play on there just connect to play.icekraft.com:25535 or mc.kruxor.com should also still work.

Favorite Links