类的jquery选择器选择器不起作用(bootpeg) [英] jquery selector selector for class not working(bootpeg)

查看:78
本文介绍了类的jquery选择器选择器不起作用(bootpeg)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用 jquery bootpag 在页面上显示分页

I am using jquery bootpag to display pagination on a page

<div class="textgray showing"></div>

我应该如何告诉jQuery选择该div?我尝试了以下方法,但都没有成功

How should I tell jQuery to select this div? I tried the following without but neither of these attempts work

$(".textgray .showing").html("some text");

$(".textgray showing").html("some text");

P.S我是前端的初学者,请多多包涵

P.S I am a beginner in frontend so bear with me

推荐答案

该空格表示第二部分在第一部分之内(称为

The space means the second part is inside the first one (it's called the descendant combinator). Remove it:

$(".textgray.showing").html("some text");

这篇关于类的jquery选择器选择器不起作用(bootpeg)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆