hi astonecipher
i rely thx for your code just a littel q You no i am blank to coding and from denmark )
Can you plz post a complet code?
I have try to put it in a html but it will not work i also try php but samm outcom ?
I no i rely need to read on all these codes
i just get this outcom on page:
$(document).ready(function(){ var state = "ON"; $('input[type="button"]').on('click', function(){ $( [1,2,3,4] ).each(function() { var status = state == "ON" ? "Off" : "ON"; $.get( "http://http://192.168.1." + this + "0/led?state=TURN+RED+" + status, function( data ) { $( "#b" + this ).removeClass(status == "ON" ? "active" : "inactive"); $( "#b" + this ).addClass(status == "ON" ? "inactive" : "active" ); }); }); }); }); ?> .inactive { background-color: grey; color: white; } .active { background-color: red; }
111
I think i miss somthing ? :)
Cheers
Jimmy