![]() |
Selectors (Selecting objects from list's)
Hi all, I have a problem when selecting objects from a list, example: Code:
I've already tried something like this, but i can't access Main Text Code:
jQuery:Thanks in Advance, Eder Quiñones |
There might be a more elegant way to do it, but a quick and easy hack would be to wrap the text in a span tag. That would remove the ambiguity of the selectors/functions I've looked at and only accesses the desired text as opposed to all contents like text() does.
|
if you just want to format the text style, why do you need to get the object at all?
jQuery("li.down").css('color','#f00'); :confused: |
Wouldn't the children inherit that style? That was my assumption, anyway.
|
Quote:
By the way, I can't wrap the text in "span" tags, because it'll change my menu's behavior. |
SO you cant do this http://jsfiddle.net/upAp7/?
|
Quote:
Code:
<style type="text/css">Code:
<ul>Code:
$(document).ready(function(){ |
| All times are GMT +1. The time now is 04:49 AM. |
Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.