Believe that I create some custom elements with HTML5
<orange-juice>...</orange-juice> <apple-juice>...</apple-juice> <banana-juice>...</banana-juice>
There are many types of juice elements. And I want to select them with a single instruction from jquery using my suffix.
I try this, but it does not work:
$('$=juice').html('juice');
If I take them one by one this work.
$('orange-juice').html('juice'); //this work $('apple-juice').html('juice'); //this work $('banana-juice').html('juice'); //this work
But many of these custom items are suffixed by juice . How can I select them in one instruction.
EDIT 1 He is confident that the general class will work, but this is not my code, and too many of these elements will occupy the topic one by one. But if there is no solution then, I will do it (within a month).
source share