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
}
citykid
  • 9,916
  • 10
  • 55
  • 91
  • double of http://stackoverflow.com/questions/6136855/add-title-attribute-from-css – citykid Apr 07 '13 at 17:26
  • 1
    No, it is not possible. CSS isn't used for DOM manipulation, just presentation. – Benjamin Gruenbaum Apr 07 '13 at 17:27
  • 1
    No, this does not exist for that attribute. The styling is limited. See: http://stackoverflow.com/questions/4383148/is-it-possible-to-style-a-title-and-with-css-or-js – Daniel Apr 07 '13 at 17:27
  • found the duplicate some minutes after posting but since useful responses came in, voted for close instead of deleting it. – citykid Apr 07 '13 at 17:32

1 Answers1

2

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

P Varga
  • 19,174
  • 12
  • 70
  • 108