Basic Selector Jquery (Selector All)

selector All

dimana jquery mencari element dalam suatu document html berdasarkan classnya, lho kok bisa gimana caranya dan apa maksudnya.

Jawabannya ada dsini.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <script src="../jquery-latest.js"></script> <script> $(document).ready(function(){ $("*").css("border","3px solid red"); }); </script> <style> div,span,p { width: 150px; height: 60px; float:left; padding: 10px; margin: 10px; background-color: […]

Basic Selector JQuery (Selector by Class)

selector by Class

dimana jquery mencari element dalam suatu document html berdasarkan classnya, lho kok bisa gimana caranya dan apa maksudnya.

Jawabannya ada dsini.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <script src="../jquery-latest.js"></script> <script> $(document).ready(function(){ $(".myClass").css("border","3px solid red"); }); </script> <style> div,span { width: 150px; height: 60px; float:left; padding: 10px; margin: 10px; […]

Basic Selector Jquery (Selector by Element)

selector by Element

pada selector ini, jquery mencari element dalam suatu document html berdasarkan elementnya, lho kok bisa gimana caranya dan apa maksudnya.

Jawabannya ada dsini.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <script src="../jquery-latest.js"></script> <script> $(document).ready(function(){ $("div").css("border","3px solid red"); }); </script> <style> div,span { width: 60px; height: 60px; float:left; padding: 10px; […]