jquery - Laravel: populate select box with ajax -


i have 'category' table has attributes 'class', 'subject'. in select box have class names. according selection in class box want load subjects in box. please let me know way.

so way want multi class selector this;

$(".class.subject"); 

so may have;

<div class="myclass1 subject1"></div> <div class="myclass1 subject1"></div> <div class="myclass2 subject2"></div> <div class="myclass2 subject1"></div> 

if use $(".myclass2.subject2") 1 div.

if need specify div use $("div .myclass2.subject2"). haven't tested 1 think it's ok.

once have list of items above can use each , clone each element other box.

https://api.jquery.com/each/ , https://api.jquery.com/clone/


Comments