{"id":26624,"date":"2023-03-22T20:27:00","date_gmt":"2023-03-22T13:27:00","guid":{"rendered":"https:\/\/www.caodangvietmy.edu.vn\/?p=26624"},"modified":"2023-04-05T13:59:07","modified_gmt":"2023-04-05T06:59:07","slug":"tich-hop-dang-vuot-cho-slideshow","status":"publish","type":"post","link":"https:\/\/www.caodangvietmy.edu.vn\/en\/tich-hop-dang-vuot-cho-slideshow\/","title":{"rendered":"INTEGRATED SWIPE STYLE FOR SLIDESHOWS"},"content":{"rendered":"<p style=\"text-align: justify;\"><span style=\"font-family: 'times new roman', times, serif;\">Currently, to create more convenience for users and provide the best possible experience, especially for users of our website on smartphones, in addition to simply creating navigation buttons to switch slides, we can integrate swipe gestures to make it easier for users to view slides on our page. Many popular websites also use this function for their slides, such as Tiki and Shopee.<\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-family: 'times new roman', times, serif;\"><img loading=\"lazy\" decoding=\"async\" width=\"843\" height=\"256\" class=\"wp-image-26625 aligncenter\" src=\"https:\/\/www.caodangvietmy.edu.vn\/wp-content\/uploads\/2023\/03\/two-people-looking-at-a-computer-description-auto.png\" alt=\"Two people looking at a computer Description automatically generated with medium confidence\" srcset=\"https:\/\/www.caodangvietmy.edu.vn\/wp-content\/uploads\/2023\/03\/two-people-looking-at-a-computer-description-auto.png 843w, https:\/\/www.caodangvietmy.edu.vn\/wp-content\/uploads\/2023\/03\/two-people-looking-at-a-computer-description-auto-640x194.png 640w, https:\/\/www.caodangvietmy.edu.vn\/wp-content\/uploads\/2023\/03\/two-people-looking-at-a-computer-description-auto-768x233.png 768w, https:\/\/www.caodangvietmy.edu.vn\/wp-content\/uploads\/2023\/03\/two-people-looking-at-a-computer-description-auto-430x131.png 430w\" sizes=\"(max-width: 843px) 100vw, 843px\" \/><\/span><\/p>\n<div style=\"text-align: center;\"><span style=\"font-family: 'times new roman', times, serif;\"><em>Shopee product slideshow<\/em><\/span><\/div>\n<p style=\"text-align: justify;\"><span style=\"font-family: 'times new roman', times, serif;\"><img loading=\"lazy\" decoding=\"async\" width=\"841\" height=\"292\" class=\"wp-image-26626 aligncenter\" src=\"https:\/\/www.caodangvietmy.edu.vn\/wp-content\/uploads\/2023\/03\/graphical-user-interface-description-automaticall.png\" alt=\"Graphical user interface Description automatically generated\" srcset=\"https:\/\/www.caodangvietmy.edu.vn\/wp-content\/uploads\/2023\/03\/graphical-user-interface-description-automaticall.png 841w, https:\/\/www.caodangvietmy.edu.vn\/wp-content\/uploads\/2023\/03\/graphical-user-interface-description-automaticall-640x222.png 640w, https:\/\/www.caodangvietmy.edu.vn\/wp-content\/uploads\/2023\/03\/graphical-user-interface-description-automaticall-768x267.png 768w, https:\/\/www.caodangvietmy.edu.vn\/wp-content\/uploads\/2023\/03\/graphical-user-interface-description-automaticall-430x149.png 430w\" sizes=\"(max-width: 841px) 100vw, 841px\" \/><\/span><\/p>\n<div style=\"text-align: center;\"><span style=\"font-family: 'times new roman', times, serif;\"><em>Tiki product slides<\/em><\/span><\/div>\n<p style=\"text-align: justify;\"><span style=\"font-family: 'times new roman', times, serif;\">II. Implementation:<\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-family: 'times new roman', times, serif;\">Step 1: We will code in HTML.<\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-family: 'times new roman', times, serif;\"><img loading=\"lazy\" decoding=\"async\" width=\"734\" height=\"189\" class=\"wp-image-26627\" src=\"https:\/\/www.caodangvietmy.edu.vn\/wp-content\/uploads\/2023\/03\/a-screenshot-of-a-computer-description-automatica.png\" alt=\"A screenshot of a computer Description automatically generated with medium confidence\" srcset=\"https:\/\/www.caodangvietmy.edu.vn\/wp-content\/uploads\/2023\/03\/a-screenshot-of-a-computer-description-automatica.png 734w, https:\/\/www.caodangvietmy.edu.vn\/wp-content\/uploads\/2023\/03\/a-screenshot-of-a-computer-description-automatica-640x165.png 640w, https:\/\/www.caodangvietmy.edu.vn\/wp-content\/uploads\/2023\/03\/a-screenshot-of-a-computer-description-automatica-430x111.png 430w\" sizes=\"(max-width: 734px) 100vw, 734px\" \/><\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-family: 'times new roman', times, serif;\">Step 2: We&#039;ll add some CSS to make it look better.<\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-family: 'times new roman', times, serif;\"><img loading=\"lazy\" decoding=\"async\" width=\"428\" height=\"632\" class=\"wp-image-26628\" src=\"https:\/\/www.caodangvietmy.edu.vn\/wp-content\/uploads\/2023\/03\/text-description-automatically-generated.png\" alt=\"Text Description automatically generated\" srcset=\"https:\/\/www.caodangvietmy.edu.vn\/wp-content\/uploads\/2023\/03\/text-description-automatically-generated.png 428w, https:\/\/www.caodangvietmy.edu.vn\/wp-content\/uploads\/2023\/03\/text-description-automatically-generated-176x260.png 176w\" sizes=\"(max-width: 428px) 100vw, 428px\" \/><\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-family: 'times new roman', times, serif;\">These commands are used later to calculate the data and assign it to translateX to transition slides, and the two commands below are used to create smoother slide-swiping effects.<\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-family: 'times new roman', times, serif;\"><img loading=\"lazy\" decoding=\"async\" width=\"414\" height=\"86\" class=\"wp-image-26629\" src=\"https:\/\/www.caodangvietmy.edu.vn\/wp-content\/uploads\/2023\/03\/text-description-automatically-generated-1.png\" alt=\"Text Description automatically generated\" \/><\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-family: 'times new roman', times, serif;\"><img loading=\"lazy\" decoding=\"async\" width=\"454\" height=\"834\" class=\"wp-image-26630\" src=\"https:\/\/www.caodangvietmy.edu.vn\/wp-content\/uploads\/2023\/03\/text-description-automatically-generated-2.png\" alt=\"Text Description automatically generated\" srcset=\"https:\/\/www.caodangvietmy.edu.vn\/wp-content\/uploads\/2023\/03\/text-description-automatically-generated-2.png 454w, https:\/\/www.caodangvietmy.edu.vn\/wp-content\/uploads\/2023\/03\/text-description-automatically-generated-2-348x640.png 348w, https:\/\/www.caodangvietmy.edu.vn\/wp-content\/uploads\/2023\/03\/text-description-automatically-generated-2-142x260.png 142w\" sizes=\"(max-width: 454px) 100vw, 454px\" \/><\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-family: 'times new roman', times, serif;\"><img loading=\"lazy\" decoding=\"async\" width=\"186\" height=\"178\" class=\"wp-image-26631\" src=\"https:\/\/www.caodangvietmy.edu.vn\/wp-content\/uploads\/2023\/03\/text-description-automatically-generated-3.png\" alt=\"Text Description automatically generated\" \/><\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-family: 'times new roman', times, serif;\">Step 3: We will now move on to the JavaScript code.<\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-family: 'times new roman', times, serif;\"><img loading=\"lazy\" decoding=\"async\" width=\"1838\" height=\"840\" class=\"wp-image-26632\" src=\"https:\/\/www.caodangvietmy.edu.vn\/wp-content\/uploads\/2023\/03\/background-pattern-description-automatically-gene.png\" alt=\"Background pattern Description automatically generated with low confidence\" srcset=\"https:\/\/www.caodangvietmy.edu.vn\/wp-content\/uploads\/2023\/03\/background-pattern-description-automatically-gene.png 1838w, https:\/\/www.caodangvietmy.edu.vn\/wp-content\/uploads\/2023\/03\/background-pattern-description-automatically-gene-640x292.png 640w, https:\/\/www.caodangvietmy.edu.vn\/wp-content\/uploads\/2023\/03\/background-pattern-description-automatically-gene-1024x468.png 1024w, https:\/\/www.caodangvietmy.edu.vn\/wp-content\/uploads\/2023\/03\/background-pattern-description-automatically-gene-768x351.png 768w, https:\/\/www.caodangvietmy.edu.vn\/wp-content\/uploads\/2023\/03\/background-pattern-description-automatically-gene-1536x702.png 1536w, https:\/\/www.caodangvietmy.edu.vn\/wp-content\/uploads\/2023\/03\/background-pattern-description-automatically-gene-430x197.png 430w\" sizes=\"(max-width: 1838px) 100vw, 1838px\" \/><\/span><\/p>\n<div style=\"text-align: center;\"><span style=\"font-family: 'times new roman', times, serif;\"><em>This is when we have finished coding the HTML and CSS above.<\/em><\/span><\/div>\n<p style=\"text-align: justify;\"><span style=\"font-family: 'times new roman', times, serif;\">We will use a for loop to add images to the HTML.<\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-family: 'times new roman', times, serif;\"><img loading=\"lazy\" decoding=\"async\" width=\"662\" height=\"316\" class=\"wp-image-26633\" src=\"https:\/\/www.caodangvietmy.edu.vn\/wp-content\/uploads\/2023\/03\/text-description-automatically-generated-4.png\" alt=\"Text Description automatically generated\" srcset=\"https:\/\/www.caodangvietmy.edu.vn\/wp-content\/uploads\/2023\/03\/text-description-automatically-generated-4.png 662w, https:\/\/www.caodangvietmy.edu.vn\/wp-content\/uploads\/2023\/03\/text-description-automatically-generated-4-640x305.png 640w, https:\/\/www.caodangvietmy.edu.vn\/wp-content\/uploads\/2023\/03\/text-description-automatically-generated-4-430x205.png 430w\" sizes=\"(max-width: 662px) 100vw, 662px\" \/><\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-family: 'times new roman', times, serif;\">We will initialize some variables to store values during the process and create an array of slides to store the classes with the slide names we set above.<\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-family: 'times new roman', times, serif;\"><img loading=\"lazy\" decoding=\"async\" width=\"610\" height=\"224\" class=\"wp-image-26634\" src=\"https:\/\/www.caodangvietmy.edu.vn\/wp-content\/uploads\/2023\/03\/graphical-user-interface-text-application-descr.png\" alt=\"Graphical user interface, text, application Description automatically generated\" srcset=\"https:\/\/www.caodangvietmy.edu.vn\/wp-content\/uploads\/2023\/03\/graphical-user-interface-text-application-descr.png 610w, https:\/\/www.caodangvietmy.edu.vn\/wp-content\/uploads\/2023\/03\/graphical-user-interface-text-application-descr-430x158.png 430w\" sizes=\"(max-width: 610px) 100vw, 610px\" \/><\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-family: 'times new roman', times, serif;\">We use `forEach` to assign events to each element of the `slides` array. Below are the events that occur when the user swipes the mouse.<\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-family: 'times new roman', times, serif;\"><img loading=\"lazy\" decoding=\"async\" width=\"708\" height=\"308\" class=\"wp-image-26635\" src=\"https:\/\/www.caodangvietmy.edu.vn\/wp-content\/uploads\/2023\/03\/text-description-automatically-generated-5.png\" alt=\"Text Description automatically generated\" srcset=\"https:\/\/www.caodangvietmy.edu.vn\/wp-content\/uploads\/2023\/03\/text-description-automatically-generated-5.png 708w, https:\/\/www.caodangvietmy.edu.vn\/wp-content\/uploads\/2023\/03\/text-description-automatically-generated-5-640x278.png 640w, https:\/\/www.caodangvietmy.edu.vn\/wp-content\/uploads\/2023\/03\/text-description-automatically-generated-5-430x187.png 430w\" sizes=\"(max-width: 708px) 100vw, 708px\" \/><\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-family: 'times new roman', times, serif;\"><img loading=\"lazy\" decoding=\"async\" width=\"456\" height=\"46\" class=\"wp-image-26636\" src=\"https:\/\/www.caodangvietmy.edu.vn\/wp-content\/uploads\/2023\/03\/word-image-26624-12.png\" srcset=\"https:\/\/www.caodangvietmy.edu.vn\/wp-content\/uploads\/2023\/03\/word-image-26624-12.png 456w, https:\/\/www.caodangvietmy.edu.vn\/wp-content\/uploads\/2023\/03\/word-image-26624-12-430x43.png 430w\" sizes=\"(max-width: 456px) 100vw, 456px\" \/><\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-family: 'times new roman', times, serif;\">This function is used to get the user&#039;s coordinates when a mouse swipe event occurs.<\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-family: 'times new roman', times, serif;\"><img loading=\"lazy\" decoding=\"async\" width=\"771\" height=\"89\" class=\"wp-image-26637\" src=\"https:\/\/www.caodangvietmy.edu.vn\/wp-content\/uploads\/2023\/03\/word-image-26624-13.png\" srcset=\"https:\/\/www.caodangvietmy.edu.vn\/wp-content\/uploads\/2023\/03\/word-image-26624-13.png 771w, https:\/\/www.caodangvietmy.edu.vn\/wp-content\/uploads\/2023\/03\/word-image-26624-13-640x74.png 640w, https:\/\/www.caodangvietmy.edu.vn\/wp-content\/uploads\/2023\/03\/word-image-26624-13-768x89.png 768w, https:\/\/www.caodangvietmy.edu.vn\/wp-content\/uploads\/2023\/03\/word-image-26624-13-430x50.png 430w\" sizes=\"(max-width: 771px) 100vw, 771px\" \/><\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-family: 'times new roman', times, serif;\">The touchstart event occurs when the user touches an element (after clicking down with the mouse).<\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-family: 'times new roman', times, serif;\"><img loading=\"lazy\" decoding=\"async\" width=\"559\" height=\"192\" class=\"wp-image-26638\" src=\"https:\/\/www.caodangvietmy.edu.vn\/wp-content\/uploads\/2023\/03\/text-description-automatically-generated-6.png\" alt=\"Text Description automatically generated\" srcset=\"https:\/\/www.caodangvietmy.edu.vn\/wp-content\/uploads\/2023\/03\/text-description-automatically-generated-6.png 559w, https:\/\/www.caodangvietmy.edu.vn\/wp-content\/uploads\/2023\/03\/text-description-automatically-generated-6-430x148.png 430w\" sizes=\"(max-width: 559px) 100vw, 559px\" \/><\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-family: 'times new roman', times, serif;\">This variable is used to store the user&#039;s mouse click coordinates when they first click down on the screen.<\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-family: 'times new roman', times, serif;\"><img loading=\"lazy\" decoding=\"async\" width=\"403\" height=\"43\" class=\"wp-image-26639\" src=\"https:\/\/www.caodangvietmy.edu.vn\/wp-content\/uploads\/2023\/03\/word-image-26624-15.png\" \/><\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-family: 'times new roman', times, serif;\">This variable is used to check whether the user has clicked on our slide. Since they have clicked, we assign the value = true;<\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-family: 'times new roman', times, serif;\"><img loading=\"lazy\" decoding=\"async\" width=\"278\" height=\"42\" class=\"wp-image-26640\" src=\"https:\/\/www.caodangvietmy.edu.vn\/wp-content\/uploads\/2023\/03\/word-image-26624-16.png\" \/><\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-family: 'times new roman', times, serif;\">This event occurs when the user moves their finger across the screen.<\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-family: 'times new roman', times, serif;\"><img loading=\"lazy\" decoding=\"async\" width=\"668\" height=\"163\" class=\"wp-image-26641\" src=\"https:\/\/www.caodangvietmy.edu.vn\/wp-content\/uploads\/2023\/03\/text-description-automatically-generated-7.png\" alt=\"Text Description automatically generated\" srcset=\"https:\/\/www.caodangvietmy.edu.vn\/wp-content\/uploads\/2023\/03\/text-description-automatically-generated-7.png 668w, https:\/\/www.caodangvietmy.edu.vn\/wp-content\/uploads\/2023\/03\/text-description-automatically-generated-7-640x156.png 640w, https:\/\/www.caodangvietmy.edu.vn\/wp-content\/uploads\/2023\/03\/text-description-automatically-generated-7-430x105.png 430w\" sizes=\"(max-width: 668px) 100vw, 668px\" \/><\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-family: 'times new roman', times, serif;\">This command is used to retrieve the last known position of the mouse cursor after the user has completed a swipe.<\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-family: 'times new roman', times, serif;\"><img loading=\"lazy\" decoding=\"async\" width=\"533\" height=\"38\" class=\"wp-image-26642\" src=\"https:\/\/www.caodangvietmy.edu.vn\/wp-content\/uploads\/2023\/03\/word-image-26624-18.png\" srcset=\"https:\/\/www.caodangvietmy.edu.vn\/wp-content\/uploads\/2023\/03\/word-image-26624-18.png 533w, https:\/\/www.caodangvietmy.edu.vn\/wp-content\/uploads\/2023\/03\/word-image-26624-18-430x31.png 430w\" sizes=\"(max-width: 533px) 100vw, 533px\" \/><\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-family: 'times new roman', times, serif;\">The touchEnd event occurs when the user removes their finger from an element (ending the swipe).<\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-family: 'times new roman', times, serif;\"><img loading=\"lazy\" decoding=\"async\" width=\"602\" height=\"473\" class=\"wp-image-26643\" src=\"https:\/\/www.caodangvietmy.edu.vn\/wp-content\/uploads\/2023\/03\/text-description-automatically-generated-8.png\" alt=\"Text Description automatically generated\" srcset=\"https:\/\/www.caodangvietmy.edu.vn\/wp-content\/uploads\/2023\/03\/text-description-automatically-generated-8.png 602w, https:\/\/www.caodangvietmy.edu.vn\/wp-content\/uploads\/2023\/03\/text-description-automatically-generated-8-331x260.png 331w\" sizes=\"(max-width: 602px) 100vw, 602px\" \/><\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-family: 'times new roman', times, serif;\">This statement is used to calculate the user&#039;s swipe distance. The idea is that if the distance is within the range (-100px ???? 0 &amp;&amp; 0 ???? 100px), the slide transition will not occur; only if it is outside this range will the slide transition occur. It also checks whether the user is swiping left or right to proceed to the next slide.<\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-family: 'times new roman', times, serif;\"><img loading=\"lazy\" decoding=\"async\" width=\"701\" height=\"39\" class=\"wp-image-26644\" src=\"https:\/\/www.caodangvietmy.edu.vn\/wp-content\/uploads\/2023\/03\/word-image-26624-20.png\" srcset=\"https:\/\/www.caodangvietmy.edu.vn\/wp-content\/uploads\/2023\/03\/word-image-26624-20.png 701w, https:\/\/www.caodangvietmy.edu.vn\/wp-content\/uploads\/2023\/03\/word-image-26624-20-640x36.png 640w, https:\/\/www.caodangvietmy.edu.vn\/wp-content\/uploads\/2023\/03\/word-image-26624-20-430x24.png 430w\" sizes=\"(max-width: 701px) 100vw, 701px\" \/><\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-family: 'times new roman', times, serif;\"><img loading=\"lazy\" decoding=\"async\" width=\"553\" height=\"250\" class=\"wp-image-26645\" src=\"https:\/\/www.caodangvietmy.edu.vn\/wp-content\/uploads\/2023\/03\/text-description-automatically-generated-9.png\" alt=\"Text Description automatically generated\" srcset=\"https:\/\/www.caodangvietmy.edu.vn\/wp-content\/uploads\/2023\/03\/text-description-automatically-generated-9.png 553w, https:\/\/www.caodangvietmy.edu.vn\/wp-content\/uploads\/2023\/03\/text-description-automatically-generated-9-430x194.png 430w\" sizes=\"(max-width: 553px) 100vw, 553px\" \/><\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-family: 'times new roman', times, serif;\">This command calculates the number we will assign to translateX to execute the next or previous slide.<\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-family: 'times new roman', times, serif;\"><img loading=\"lazy\" decoding=\"async\" width=\"737\" height=\"36\" class=\"wp-image-26646\" src=\"https:\/\/www.caodangvietmy.edu.vn\/wp-content\/uploads\/2023\/03\/word-image-26624-22.png\" srcset=\"https:\/\/www.caodangvietmy.edu.vn\/wp-content\/uploads\/2023\/03\/word-image-26624-22.png 737w, https:\/\/www.caodangvietmy.edu.vn\/wp-content\/uploads\/2023\/03\/word-image-26624-22-640x31.png 640w, https:\/\/www.caodangvietmy.edu.vn\/wp-content\/uploads\/2023\/03\/word-image-26624-22-430x21.png 430w\" sizes=\"(max-width: 737px) 100vw, 737px\" \/><\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-family: 'times new roman', times, serif;\"><img loading=\"lazy\" decoding=\"async\" width=\"708\" height=\"105\" class=\"wp-image-26647\" src=\"https:\/\/www.caodangvietmy.edu.vn\/wp-content\/uploads\/2023\/03\/graphical-user-interface-text-description-automa.png\" alt=\"Graphical user interface, text Description automatically generated\" srcset=\"https:\/\/www.caodangvietmy.edu.vn\/wp-content\/uploads\/2023\/03\/graphical-user-interface-text-description-automa.png 708w, https:\/\/www.caodangvietmy.edu.vn\/wp-content\/uploads\/2023\/03\/graphical-user-interface-text-description-automa-640x95.png 640w, https:\/\/www.caodangvietmy.edu.vn\/wp-content\/uploads\/2023\/03\/graphical-user-interface-text-description-automa-430x64.png 430w\" sizes=\"(max-width: 708px) 100vw, 708px\" \/><\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-family: 'times new roman', times, serif;\">And that&#039;s how we&#039;ve completed the swipe-and-slide feature.<\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-family: 'times new roman', times, serif;\">2. This function automatically switches slides and assigns events to the next and previous slide buttons. We just need to change the variable currentIndex(slide position) and call the setlaivitri() function.<\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-family: 'times new roman', times, serif;\"><img loading=\"lazy\" decoding=\"async\" width=\"519\" height=\"577\" class=\"wp-image-26648\" src=\"https:\/\/www.caodangvietmy.edu.vn\/wp-content\/uploads\/2023\/03\/text-description-automatically-generated-10.png\" alt=\"Text Description automatically generated\" srcset=\"https:\/\/www.caodangvietmy.edu.vn\/wp-content\/uploads\/2023\/03\/text-description-automatically-generated-10.png 519w, https:\/\/www.caodangvietmy.edu.vn\/wp-content\/uploads\/2023\/03\/text-description-automatically-generated-10-234x260.png 234w\" sizes=\"(max-width: 519px) 100vw, 519px\" \/><\/span><\/p>\n<p style=\"text-align: justify;\">","protected":false},"excerpt":{"rendered":"<p>Currently, to create more convenience for users, to provide them with the best possible experience, especially for users of our website on smartphone platforms, in addition to simply creating navigation buttons to switch slides, we can also...<\/p>","protected":false},"author":63,"featured_media":26625,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[33,877,851,626,850],"tags":[],"_links":{"self":[{"href":"https:\/\/www.caodangvietmy.edu.vn\/en\/wp-json\/wp\/v2\/posts\/26624"}],"collection":[{"href":"https:\/\/www.caodangvietmy.edu.vn\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.caodangvietmy.edu.vn\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.caodangvietmy.edu.vn\/en\/wp-json\/wp\/v2\/users\/63"}],"replies":[{"embeddable":true,"href":"https:\/\/www.caodangvietmy.edu.vn\/en\/wp-json\/wp\/v2\/comments?post=26624"}],"version-history":[{"count":0,"href":"https:\/\/www.caodangvietmy.edu.vn\/en\/wp-json\/wp\/v2\/posts\/26624\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.caodangvietmy.edu.vn\/en\/wp-json\/wp\/v2\/media\/26625"}],"wp:attachment":[{"href":"https:\/\/www.caodangvietmy.edu.vn\/en\/wp-json\/wp\/v2\/media?parent=26624"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.caodangvietmy.edu.vn\/en\/wp-json\/wp\/v2\/categories?post=26624"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.caodangvietmy.edu.vn\/en\/wp-json\/wp\/v2\/tags?post=26624"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}