When the user clicks the radio button's label I want to change the gear in the selected label icon. So for example:
If a user clicks on the tag The top gear (cog) will change in a tag.
This is my code:
var current-icon = $ ('span.carat i.icon-cog'); $ ('#tepe-search-filter label'). Click (function () {var icon = $ (this) .find ('I'); current-icon.val (icon);}); How can I make this possible? To show who I am working with, thanks in advance!
something like this:
$ ('# hidden search- Filter label ') (' click ', function () {$ ('. Carat i: first-child '). Et (' square ', $ (' i ', this) .attr (' orbit ')); });
val () sets and becomes the value of an element, such as: & Lt; Input type = "text" value = "this is a string" /> You have to change the class, and you must use attr () (we are trying to change the attribute, classname property is not) class to class Resets the new value, where addClass and removeClass will add or remove a square, while all other classes will be placed.
No comments:
Post a Comment