javascript - How to get info button to appear and make it functional in jquery mobile or javascript
问题描述
attached you will see a photo of an app that is a unit converter. In the picture it has small info buttons that are clickable and when clicked, information correlating to the input section nexts to it shows as an alert in the app and relays information about that section. I am wondering how this is accomplished and if it can be done using jQuery mobile and or JavaScript.
解决方案
使用 jQuery
$("#id_of_button").click(function(){
alert("Named after the " + input_value1.value + " who invented " + input_value2.value + " etc..."); // Insert the values from your form inputs into this alert function
});
推荐阅读
- laravel - Laravel 广播/WebSockets:如何只为经过身份验证/登录的用户运行?
- android - 房间。DaoImpl 构建不正确
- python - python烧瓶中的全局变量替代品(ajax请求)
- git - 如何将 git 命令转换为纱线,特别是 git remote add origin?
- android - 没有测试结果
- html - 可选斜线的功能
- android - 画一个讲话泡泡
- linux - 为什么在电缆连接断开的情况下套接字发送()返回成功代码?
- arrays - 使用 Rails 通过 Sendgrid 发送大量邮件
- css - 更改 WooCommerce 电子邮件标题大小