Actually i, I am working on aan extension which help to buy product from flipkart during flash sale. On teh product page i cantI can't click on Buy Now"Buy Now" button with the help of javascriptsJavaScript its show me undefineundefined this is the code of Buy Now button:
<form><button class="_2AkmmA _2Npkh4 _2kuvG8 _7UHT_c" type="button"><span class="_279WdV"></span> <!-- -->BUY NOW</button></form> ThisThe Button is in this page
I am using the code to click this button in my javascriptJavaScript file
$("._2AkmmA._2Npkh4._2kuvG8._7UHT_c").click(); but it show me undefined while ifHowever, even when I go to the page on the site and, in the console, execute
$("._2AkmmA._2Npkh4._2kuvG8._7UHT_c").click(); The console shows undefined and does not start the "Buy Now" process that is started by manually using the mouse to click on the "Buy Now" button. In the console, executing
$("._2AkmmA._2Npkh4._2kuvG8._7UHT_c"); Shows:
<button class="_2AkmmA _2Npkh4 _2kuvG8 _7UHT_c" type="button"><span class="_279WdV"></span> <!-- -->BUY NOW</button> which is the correct button that I desire to programmatically click. Note that even though I used $(), what is returned is not a jQuery Object.
If I click on that button manually thats works to check, I'm shown the problem goto on dialog for "Buy Now". You can go to this page link and open console in developer mode try to click on Buy Now Button using JavaScriptit yourself.
- I am not getinggetting what is the problem here is. Is there any problem in my code or its any kind of protection form filpkart website side?