Question

Asked on 2011-05-10 at 08:30:05ID: 27360752

How to select a span element in jquery?

by: FairyBusiness500

Rating8.5Very Good

Hi, I am trying to select a span with jquery:

      $('span').css({color: #30a01f});

but its not working.  Any ideas?

Also, how would I select it according to its div?  Something like this?

$('#div > span').css({color: #30a01f});

or

$('#div:span').css({color: #30a01f});

Related Solutions

Solution

Sign up now to view this solution! It's quick, easy, and secure to subscribe. We will return you to this solution, unlocked, when you’re done.

About this Solution

View This Solution - Start Your 30 Day Free Trial
Zone
general
Tags
jquery
Participating Experts
2
Solution Grade
A

Replies

 by: cmalakar

Posted on 2011-05-10 at 08:52:44ID: 36812588

All comments and solutions are available to Premium Service Members only. Sign up to view the solution to this question. Already a member? Log in to view this solution.

 by: cmalakar

Posted on 2011-05-10 at 08:53:33ID: 36812589

All comments and solutions are available to Premium Service Members only. Sign up to view the solution to this question. Already a member? Log in to view this solution.

 by: leakim971

Posted on 2011-05-10 at 09:01:32ID: 36812590

All comments and solutions are available to Premium Service Members only. Sign up to view the solution to this question. Already a member? Log in to view this solution.

 by: FairyBusiness

Posted on 2011-05-10 at 11:24:10ID: 36812591

All comments and solutions are available to Premium Service Members only. Sign up to view the solution to this question. Already a member? Log in to view this solution.

 by: leakim971

Posted on 2011-05-10 at 11:32:08ID: 36812592

All comments and solutions are available to Premium Service Members only. Sign up to view the solution to this question. Already a member? Log in to view this solution.

 by: leakim971

Posted on 2011-05-10 at 11:32:44ID: 36812593

All comments and solutions are available to Premium Service Members only. Sign up to view the solution to this question. Already a member? Log in to view this solution.

 by: FairyBusiness

Posted on 2011-05-10 at 11:32:53ID: 36812594

All comments and solutions are available to Premium Service Members only. Sign up to view the solution to this question. Already a member? Log in to view this solution.

 by: cmalakar

Posted on 2011-05-10 at 11:33:17ID: 36812595

All comments and solutions are available to Premium Service Members only. Sign up to view the solution to this question. Already a member? Log in to view this solution.

 by: FairyBusiness

Posted on 2011-05-10 at 11:34:34ID: 36812596

All comments and solutions are available to Premium Service Members only. Sign up to view the solution to this question. Already a member? Log in to view this solution.

 by: cmalakar

Posted on 2011-05-10 at 11:35:04ID: 36812597

All comments and solutions are available to Premium Service Members only. Sign up to view the solution to this question. Already a member? Log in to view this solution.

 by: leakim971

Posted on 2011-05-10 at 11:36:01ID: 36812598

All comments and solutions are available to Premium Service Members only. Sign up to view the solution to this question. Already a member? Log in to view this solution.

 by: leakim971

Posted on 2011-05-10 at 11:36:24ID: 36812599

All comments and solutions are available to Premium Service Members only. Sign up to view the solution to this question. Already a member? Log in to view this solution.

 by: FairyBusiness

Posted on 2011-05-10 at 11:37:47ID: 36812600

All comments and solutions are available to Premium Service Members only. Sign up to view the solution to this question. Already a member? Log in to view this solution.

 by: leakim971

Posted on 2011-05-10 at 11:40:22ID: 36812601

All comments and solutions are available to Premium Service Members only. Sign up to view the solution to this question. Already a member? Log in to view this solution.

 by: FairyBusiness

Posted on 2011-05-10 at 11:41:49ID: 36812602

All comments and solutions are available to Premium Service Members only. Sign up to view the solution to this question. Already a member? Log in to view this solution.

 by: cmalakar

Posted on 2011-05-10 at 11:44:40ID: 36812603

All comments and solutions are available to Premium Service Members only. Sign up to view the solution to this question. Already a member? Log in to view this solution.

 by: cmalakar

Posted on 2011-05-10 at 11:45:22ID: 36812604

All comments and solutions are available to Premium Service Members only. Sign up to view the solution to this question. Already a member? Log in to view this solution.

 by: FairyBusiness

Posted on 2011-05-10 at 11:45:40ID: 36812605

All comments and solutions are available to Premium Service Members only. Sign up to view the solution to this question. Already a member? Log in to view this solution.

Log In

Forgot your password?Sign up

Top Experts

  1. mplungjan

    1,840

    0 points yesterday

    Profile

BrowseAre you an Expert?