Change attr width on object -


how change attr width on object, i'm trying this, seems not work...

jquery('.big').click(function(){     jquery('#flvplayer').attr("width", "100"); }); 

here code need change height , width on click

<a class="big">100</a> <textarea><object id="flvplayer" height="665" width="425"></object></textarea> 

use .css instead of .attr.

jquery('.big').click(function(){     jquery('#flvplayer').css("width", "100"); }); 

width css property.

edit: in textarea have text. <object> not html element. text in text area.

so, change text in textarea.

$('.big').click(function(){     var text = "<object id=\"flvplayer\" height=\"665\" width=\"100\"></object>"     $("textarea").val(text); }); 

also, suggest use $ instead of jquery. it's easier , faster write.


Comments

Popular posts from this blog

Delphi XE2 Indy10 udp client-server interchange using SendBuffer-ReceiveBuffer -

Qt ActiveX WMI QAxBase::dynamicCallHelper: ItemIndex(int): No such property in -

Enable autocomplete or intellisense in Atom editor for PHP -