필터 지우기
필터 지우기

How to create toggle button in jquery to update your thingspeak channel?

조회 수: 2 (최근 30일)
Gcobani Mkontwana
Gcobani Mkontwana 2019년 11월 26일
편집: Hans Scharler 2019년 11월 26일
Hi Team
Can any mate, help me i want to create a 1 button to toggle when it turn on and off. But it must be able to read an update field from my thingspeak channel. I have tried the followin
<label for='opt2'></label>
<input type='checkbox' name='opt2' id='opt2' value='1' class='toggleswitch' />
// on click button toggle.
$(document).ready(function($) {
$('.toggleswitch').toggleSwitch();
$("#opt2").trigger("click"); // turn it on
if($(mainParent).find('input.toggleswitch').is(':checked')){
window.open('https://api.thingspeak.com/update?api_key=XXX&field8=1');
}
});
g both HTML and Jquery no luck.

답변 (0개)

커뮤니티

더 많은 답변 보기:  ThingSpeak 커뮤니티

카테고리

Help CenterFile Exchange에서 ThingSpeak에 대해 자세히 알아보기

제품


릴리스

R2019a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by