EasyUI Forum
June 25, 2024, 06:48:34 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Change font-size of linkbutton  (Read 6050 times)
korenanzo
Guest
« on: January 22, 2016, 04:12:41 AM »

Hi,

How I can set programmatically the text dimension (font-size) of a linkbutton?
Logged
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #1 on: January 22, 2016, 06:35:54 AM »

Please try this:
Code:
$('#b1').linkbutton({
    text: '<span style="font-size:18px">Text</span>'
})
Logged
korenanzo
Guest
« Reply #2 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);
  })
}
});
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!