0

I have this jQuery code

var  c = ".c10";
$('[data-option-value="c"]a').trigger("click")

This code performs the click event. c10 is an id from one specific element. This code works fine without using variable : $('[data-option-value=".c10"]a').trigger("click")

As you see in the first code I used variable instead of using it directly but I didn't get any answer. Did I miss something?

Hope someone could help!

Minal Chauhan
  • 6,025
  • 8
  • 21
  • 41
Yousof
  • 1

0 Answers0