0

I am beginner of cordova learning project and creating a sample application using eclipse. Using CSS file I am able to change image, height, width, margin and padding around it.

Now, to show Labels, Buttons and Radio button, listview how to add such UI components and where to add in index.html or css and handling a click event of button?

mkrieger1
  • 19,194
  • 5
  • 54
  • 65
Swift
  • 271
  • 3
  • 13
  • 1
    You'll be implementing the UI in HTML/CSS/JS so the question is really "what HTML/CSS framework can I use". Bootstrap would be one example but there are many others. You place the UI elements in HTML, and then interact with them in javascript – MStoner Mar 30 '17 at 11:08

1 Answers1

0

You could add any HTML component in the body tag.

<body>
//your code for various elements goes here.
</body>

But, if you want to add these components in real time use the innerHTML property (javascript) and allocate an event listener to that component.

HTML-

<label id="alpha1" onclick="fx()">Placeholder</label>

JS-

document.getElementById('alpha1').innerHTML="Content"
  function fx (){
    alert('Label Clicked');
}
Navnish Bhardwaj
  • 1,687
  • 25
  • 39
Moonis Abidi
  • 663
  • 10
  • 15