xxxxxxxxxx
//play around with input
//p5.element.change
let a;
let input
function setup() {
createCanvas(400, 400);
//BUTTON
button = createButton("GO TO SKIMS");
button.style("font-family", "Comic Sans MS");
button.style("font-size", "30px");
button.position(width / 4, height / 4);
button.mousePressed(changeBG);
a = createA(changeBG, "SKIMS");
a.position(180, 200);
//input
input = createInput ('')
input.position(100,200)
//// input.size(200)
// input.input(theinput)
}
function draw() {
background(186, 117, 152);
}
function changeBG() {
button.html("thank you!");
window.open(
"https://skims.com/collections/2-hour-delivery?gclid=CjwKCAjwoIqhBhAGEiwArXT7K7W5mHsTI4N0vb7A_QPCEz6p_fvmLev6OhV5wF326XpB2yo52nGROhoCozkQAvD_BwE",
"SKIMS"
);
}
🌸 p5.js says: you have used a p5.js reserved function "input" make sure you change the function name to something else.
+ More info: https://p5js.org/reference/#/p5/input
🌸 p5.js says: [mySketch, line 15] createA() was expecting String for the first parameter, received changeBG instead. (http://p5js.org/reference/#/p5/createA)