diff --git a/html/ListingBootstrap.html b/html/ListingBootstrap.html index 13f4982..128d092 100644 --- a/html/ListingBootstrap.html +++ b/html/ListingBootstrap.html @@ -51,38 +51,23 @@

Available Devices

-
-
- - George -
-

George is probably the coolest iPhone to exist. Ever. Point blank, period.

-
-
-
-
-
- - Linkin Park -
-

"The hardest part of ending is starting again."

-
-
-
+
+ + + \ No newline at end of file diff --git a/html/ListingBootstrap.js b/html/ListingBootstrap.js new file mode 100644 index 0000000..d2c27ff --- /dev/null +++ b/html/ListingBootstrap.js @@ -0,0 +1,64 @@ +//get all the option buttons +var options = document.getElementsByClassName('option'); + +var dev1 = { + name:"George", + description:"George is probably the coolest iPhone to exist. Ever. Point blank, period.", + hardware:"iphone", + software:"apple" +}; + +var dev2 = { + name:"Greyson", + description:"Greyson is pretty cool.. I guess.", + hardware:"iphone", + software:"apple" +}; + +var dev3 = { + name:"Linkin Park", + description:'"The hardest part of ending is starting again."', + hardware:"ipad", + software:"apple" +}; + +var dev4 = { + name:"Abercrombie", + description:"To all the people that hated me in high school, I have the prettiest clothes you all wear now!!", + hardware:"ipad", + software:"apple" +}; + +var dev5 = { + name:"Hulk", + description:"Go ahead and HULK SMASH! this awesome computer stick into your USB.", + hardware:"computerStick", + software:"intel" +}; + +var dev6 = { + name:"Captain America", + description:'"Make America Great Again. Wait, thats someone else.."', + hardware:"computerStick", + software:"intel" +}; + +var devices = [dev1, dev2, dev3, dev4, dev5, dev6]; + +for(var a = 0; a < options.length; a++){ + var type = options[a].getAttribute('data-type'); + options[a].addEventListener('click', show); +} + +function show(){ + var type = this.getAttribute('data-type'); + var html = ''; + + for(var i = 0; i < devices.length; i++){ + if(type.localeCompare(devices[i].hardware) == 0 || type.localeCompare(devices[i].software) == 0){ + html += '
' + devices[i].name + '

' + devices[i].description + '


' + } + } + + document.getElementById('devContainer').innerHTML = html; +} \ No newline at end of file diff --git a/html/imgs/computerStick.png b/html/imgs/computerStick.png new file mode 100644 index 0000000..38a5a64 Binary files /dev/null and b/html/imgs/computerStick.png differ