javascript - Ask jq about distinguishing element types.
过去多啦不再A梦
过去多啦不再A梦 2017-05-19 10:42:27
0
2
531

If the p in the picture is of different types, I now want to put the different types of p into the object (the object consists of the top, left and id of p) to form an array. How can I distinguish different types of p in the upload background? Woolen cloth? Add different classes to p and judge? Thanks!

过去多啦不再A梦
过去多啦不再A梦

reply all(2)
阿神

Since it is a type, you can generally add a class without style. You can also use data-type="a" like this.

I guess the questioner wants to make a drag-and-drop layout?

世界只因有你

Generally use the form of "data-xx" to distinguish and bind. The frontend can use js to do ajax to tell the backend which type of elements need to be processed.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template