Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

On the event highlighted in bold below, when I swipe right I want the product to be added to a checkout, but I am unsure

On the event highlighted in bold below, when I swipe right I want the product to be added to a checkout, but I am unsure of the correct syntax to do this.

var cards =[

new Tindercardsjs.card(2, 'Adidas', 'shoes, $90', 'runners.jpg'),

new Tindercardsjs.card(1, 'Converse', 'shoes, $40.', 'converse.jpg'),

new Tindercardsjs.card(0, 'Nike', 'shoes, $55', 'nike.jpg'),

];

Tindercardsjs.render(cards, $('#main'), function (event) {

if(event.direction === 'right' && event.cardid==0){

window.location.href ='

'; //how can i fix this line?

}

else if(event.direction === 'right' && event.cardid==1){

window.location.href = 'https://www.converse.com';

}

else{

""; }

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

MySQL Crash Course A Hands On Introduction To Database Development

Authors: Rick Silva

1st Edition

1718503008, 978-1718503007

More Books

Students also viewed these Databases questions

Question

7. What decisions would you make as the city manager?

Answered: 1 week ago

Question

8. How would you explain your decisions to the city council?

Answered: 1 week ago