I have 2 images displayed on a page. I want a message to appear when I click 1 image and it to disappear when I click the alternate one, then vice versa.
The jQuery code I created below seems to be working fine, but I am continuously getting an [object HTMLImageElement] message on the alternate image every time I click the one that is displaying the text.
public class AutoFillDateFormEditText extends AppCompatEditText{
public AutoFillDateFormEditText(Context context) {
super(context);
}
public AutoFillDateFormEditText(Context context, AttributeSet attrs) {
super(context, attrs);
}
public AutoFillDateFormEditText(Context context, AttributeSet attrs, int defStyle) {
super(context, attrs, defStyle);
}
@Override
public int getAutofillType() {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
return AUTOFILL_TYPE_DATE;
}
else return super.getAutofillType();
}
@Override
public void autofill(AutofillValue value) {
super.autofill(value); //what goes here ? im lost
}
@Nullable
@Override
public AutofillValue getAutofillValue() {
return //what should i return here ????
}
}
And the html
$(document).ready(function(){
$("#gimp").click(function(){
var gimp = "Gimp message.";
var i = $("#qInkscape").text(inkscape);
if (i == true) {
$("#qInkscape").hide();
$("#qGimp").text(gimp);
} else {
$("#qGimp").text(gimp);
}
});
$("#inkscape").click(function(){
var inkscape = "Inkscape message";
var g = $("#qGimp").text(gimp);
if (g == true) {
$("#qGimp").hide();
$("#qInkscape").text(inkscape);
} else {
$("#qInkscape").text(inkscape);
}
});
});