How to add an HTML attribute with jQuery

后端 未结 7 766
无人及你
无人及你 2020-12-03 11:34

Well, I have this jQuery image slideshow that uses the attribute \"control\" inside an . Seeing how it didn\'t validate I searched for a way to add this attribute i

7条回答
  •  广开言路
    2020-12-03 11:59

    jQuery's attr will do that. Example:

    $("#previous").attr("control", "-6");
    

    Also check out this example at http://jsfiddle.net/grfSN/.

提交回复
热议问题