useruseruser
New Member
I want to create a html link with some styling in it.right now I'm using:\[code\]$('<a/>').text('sample') .attr('href', 'http://www.google.com/').appendTo('body');$('a').css({ float: 'right', fontFamily: 'Verdana, Arial, Helvetica, sans-serif', position: 'static', display: 'inline', visibility: 'inherit' });\[/code\]but instead create and refer the tag 2 times, is there are simpler way to do it? like:\[code\]$('<a/>').text('sample') .attr('href', 'http://www.google.com/').appendTo('body'); .css({ float: 'right', fontFamily: 'Verdana, Arial, Helvetica, sans-serif', position: 'static', display: 'inline', visibility: 'inherit' });\[/code\]