1

For each element of class "new" I want to show a title on hover. So using jquery I do this:

$(".new").attr("title", "import the new item");

Is it possible to create this attribute via CSS? Since we can create content I thought maybe this is possible too. So I am looking for something like

.new
{
    attr(title): "import new item"; // create property via css
}
4
  • double of stackoverflow.com/questions/6136855/… Commented Apr 7, 2013 at 17:26
  • 1
    No, it is not possible. CSS isn't used for DOM manipulation, just presentation. Commented Apr 7, 2013 at 17:27
  • 1
    No, this does not exist for that attribute. The styling is limited. See: stackoverflow.com/questions/4383148/… Commented Apr 7, 2013 at 17:27
  • found the duplicate some minutes after posting but since useful responses came in, voted for close instead of deleting it. Commented Apr 7, 2013 at 17:32

1 Answer 1

2

There is a proposal to enable this kind of functionality, called Cascasing Attribute Sheets.

Sign up to request clarification or add additional context in comments.

4 Comments

excellent answer, thx. you maybe have some really good css3 resource(s) to find such things?
If only this question wasn't a duplicate, you would have gotten an up-vote for teaching me something interesting. If you post it in the original question, you got my vote
@citykid it's not currently possible with CSS, indeed jQuery is your best bet.
@BenjaminGruenbaum thanks, I also posted this link there.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.