css - Font-Awesome with Sliding JQuery Code Error -
i creating jquery sliding navigation using font awesome (see: http://fortawesome.github.io/font-awesome/)
now upon adding css since third party web fonts icons wonder how can apply own code using + , - icon.
+ -> <i class="fa fa-plus"></i> fa-plus - -> <i class="fa fa-minus"></i> fa-minus
my jquery code is.
$("#toggle > li > div").click(function(){ if(false == $(this).next().is(':visible')) { $('#toggle ul').slideup(); $("span.minus-btn").removeclass('minus-btn'); } $(this).next().slidetoggle(); }); $("#toggle > li > div").click(function() { $("#toggle > li > div").removeclass("active"); $(this).addclass('active'); if($(this).hasclass("active")){ $("span.plus-btn", this).toggleclass('minus-btn'); } });
now stock don't know how fix sizes of icons. please help.
here's jquery fiddle link: http://jsfiddle.net/sg7lz/6/
any great + explanation please?
please show me solution on jsfiddle can check on code , results.
a big thanks!
sorry, found difficult around code, made new fiddle. fiddle
to change icon, have i.fa
element , remove .fa-plus
class , add .fa-minus
class.
also, set size of icon adding 1 of these classes: .fa-2x, .fa-3x, .fa-4x, .fa-5x
.
Comments
Post a Comment