EasyUI Forum

General Category => EasyUI for jQuery => Topic started by: korenanzo on January 22, 2016, 04:12:41 AM



Title: Change font-size of linkbutton
Post by: korenanzo on January 22, 2016, 04:12:41 AM
Hi,

How I can set programmatically the text dimension (font-size) of a linkbutton?


Title: Re: Change font-size of linkbutton
Post by: stworthy on January 22, 2016, 06:35:54 AM
Please try this:
Code:
$('#b1').linkbutton({
    text: '<span style="font-size:18px">Text</span>'
})


Title: Re: Change font-size of linkbutton
Post by: korenanzo on January 22, 2016, 07:31:16 AM
Please try this:
Code:
$('#b1').linkbutton({
    text: '<span style="font-size:18px">Text</span>'
})

Ah! ok!
thanks!

because of I need it often, i've tried to improve it:

Code:
$.extend($.fn.linkbutton.methods, {

setFontSize: function (jq,size) {
return jq.each(function () {
$(this).find('.l-btn-text').css('font-size',size);
  })
}
});