Home >Web Front-end >JS Tutorial >Add implementation in jQuery selects two id objects at the same time_jquery

Add implementation in jQuery selects two id objects at the same time_jquery

WBOY
WBOYOriginal
2016-05-16 18:17:571067browse

When using jQuery to select the demo1 tag, the following code will be used: jQuery('#demo1");

When using jQuery to select demo1 and demo2, don't tell me to use jQuery('div').

The method mentioned in the title will be used at this time, the jQuery add method: append tags

How to use jQuery add:

jQuery('#demo1").add. ('#demo2");

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn