Home > Web Front-end > HTML Tutorial > Beginner to learn div css js and can't understand the code_html/css_WEB-ITnose

Beginner to learn div css js and can't understand the code_html/css_WEB-ITnose

WBOY
Release: 2016-06-24 12:26:14
Original
958 people have browsed it

$("#Sidebar li div").click(function ()
{
$("#Sidebar li div").removeClass('leftselected');
$(this). addClass('leftselected');
   });

Is this a callback function? What does ("#Sidebar li div").click mean? What does #Sidebar followed by two li and div mean?


Reply to the discussion (solution)

You need to look at some basic things, search for "jquery selector", and then you will understand.

You need to look at some basic things. Search for "jquery selector", and then you will understand.

("#Sidebar li div") is the div of the child element of li under the element Sidebar...that is, Sidebar is the parent element of li and li is the parent element of DIV. ·I am also just learning

source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template