EasyUI Forum
March 29, 2024, 01:06:57 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: label on textbox  (Read 3730 times)
roberto
Jr. Member
**
Posts: 88


View Profile Email
« on: May 21, 2019, 10:27:50 PM »

Hi,

What am I doing wrong?

Code:
<span id="name-label">Nome do Colaborador</span>
<input id="name" class="easyui-textbox" labelPosition="after" data-options="label:$('#name-label')"/>

The label property works just if I set it as a text. If I use a selector nothing happens
Any idea?   Sad
Logged
jarry
Administrator
Hero Member
*****
Posts: 2260


View Profile Email
« Reply #1 on: May 22, 2019, 12:52:53 AM »

No problem with the code. This example works fine.
http://code.reloado.com/obituv3/edit#preview
Logged
jahangir
Newbie
*
Posts: 49



View Profile Email
« Reply #2 on: May 22, 2019, 03:11:02 AM »

add  .text() in your code after jquery selector.

Code:
<input id="name" class="easyui-textbox" labelPosition="after" data-options="label:$('#name-label').text()"/>
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!