Intel XDK - Input Hidden

Asked

Viewed 82 times

1

I’m learning to use the Intel XDK. I need to create a hidden field where you will have device information. In html we use hidden, but this command is not accepted in XDK, or I am doing something wrong.

Code:

<label class="item item-input widget uib_w_6 d-margins" data-uib="ionic/input" data-ver="0" id="dispositivo">
                <input type="text">
            </label>

If I put the hidden manually, it does not accept.

2 answers

0

There are several ways to do this without putting the "Hidden" attribute directly into your HTML.

If you want to do it with pure Javascript, it can be as follows:

document.getElementById("seuEelemento").style.visibility = "hidden";

If you can use jQuery (I don’t know if it’s possible), you can stay that way:

$("#seuEelemento").hide();

If you want to know more, or have any questions, follow some documentation:

HTML DOM Style Visibility: http://www.w3schools.com/jsref/prop_style_visibility.asp

jQuery . Hide: http://api.jquery.com/hide/

0

Dude, probably the CSS of one of the classes is interfering with the input layout.

<label data-uib="ionic/input" data-ver="0" id="dispositivo">
    <input class="text-input" type="hidden">
</label>

I did it and it worked, if I change it for text, it appears, if I put the Hidden it is hidden, but appears in the Inspect Elemento browser. And complementing the Nikofoxxx response, it is possible to use Jquery since you are calling the file, as in any HTML.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.