Question: 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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!