0

I have a nav menu with li elements,the lists are styled as

li:after { content : "+" }

Is it possible to change the content from "+" to "-" when user clicks on the li , using jquery?

semuzaboi
  • 4,972
  • 5
  • 20
  • 35
  • No, you will need to have the character inside the li instead. `li.text("+");` will alter to plus. `li.text("'");` to minus. – Anders Lindén Jul 13 '15 at 15:36
  • thanks Andes for your help .. but i can't put text direct in the li bcoz there already menu name :( – Sudipta Mondal Jul 13 '15 at 15:39
  • You can have a li like this: `var li = $("
  • ");`, then you use `li.find('.menuname').text("themenu"); li.find(".sign').text("+");`. Of if it is declared in html, it will look like `
  • `
  • – Anders Lindén Jul 14 '15 at 05:52