使CSS CLASS扩展和折叠 [英] Make CSS CLASS Expand and collapse
问题描述
你好,
我正在尝试制作css 该灰色区域使用相同的javascript按钮正在使用,所以每当我点击灰色它应该 像+图标一样展开。这怎么可能?
I am trying to make the css of that grey area to use the same javascript that button is using so whenever i click on the grey it should expand like the + icon. How can this be possible?
+图标使用此:
< a href =" javascript:" onclick =" javascript:ExpCollGroup('4-1_','img_4-1 _',event,false); return false;">< img src =" / _ layouts / 15 / images / minus.gif" ALT ="扩大" ID = QUOT; img_4-1_" border =" 0">< / a>
<a href="javascript:" onclick="javascript:ExpCollGroup('4-1_', 'img_4-1_',event, false);return false;"><img src="/_layouts/15/images/minus.gif" alt="expand" id="img_4-1_" border="0"></a>
推荐答案
我们可以使用下面的JavaScript代码来实现它。
We can use the JavaScript code below to achieve it.
<script src="https://code.jquery.com/jquery-1.12.4.min.js" type="text/javascript"></script>
<script type="text/javascript">
(function(){
(function (){
(" .ms- listviewtable tbody [id ^ ='titl']")。click(function(){
var id =
(".ms-listviewtable tbody[id^='titl']").click(function(){ var id=
这篇关于使CSS CLASS扩展和折叠的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!