listitem

List items to behave like links when cursor hovers

主宰稳场 提交于 2019-12-24 06:47:31
问题 I have some list items where I want the cursor to change from an arrow to a hand when a user hovers over them. In a sense I want it to look like a link. How can I do this? 回答1: Set the cursor to a pointer. <style type="text/css"> .fakeLink{cursor:pointer} </style> <ul> <li class='fakeLink'>This is not really a link</li> </ul> 来源: https://stackoverflow.com/questions/9495578/list-items-to-behave-like-links-when-cursor-hovers

ListItem additional custom values

一笑奈何 提交于 2019-12-24 04:01:29
问题 I am using dropdownlist in asp.net, it has collection of ListItem that represents the items of the dropdownlist, each ListItem has only two fields to hold the data, Value and Text fields, but those are not enough I would like to hold more data for each item. Let's say Text1 and Text2 in additional fields, but at the same time I would like to preserve the same behavior of the DataBind() method of the dropdownlist. 回答1: Sure, you can use the Attributes collection: ListItem li = new ListItem(

Why is ie7 ignoring the left-margin on my first list item (only)?

蓝咒 提交于 2019-12-24 00:43:14
问题 http://blog.helpcurenow.org/test/mockups/mar2010/lp.html In the above landing page, I have an offers box that has four donation buttons. The first three are targeted with individual id's and given a left margin of 13px. All is well in every browser I'm viewing in except ie7. For some reason ie7 is ignoring the left-margin of 13px on the first list item, and only on that one. The strange part is when I open ie's developer tools (not actually viewing in ie7, but using ie8 in ie7 mode) and

How to dynamically add listheaders and listcells in ZK

淺唱寂寞╮ 提交于 2019-12-23 04:26:11
问题 I am totally new in ZK. I need to create N listheaders and N listcells in my zul file. But I do not know how to do it from my java controller and I am not using MVVM. The problem would be something like: @Wire private Window idWindow; private Listheader header; private Listcell item1; @Override public void onCreate(Event event) { header.setLabel("laaaa");// It would set just one header but I can have many (N headers) and same for items } <zk> <window id="idWindow" title="nameWindow" apply=

setItemChecked (int position, boolean value) not working?

こ雲淡風輕ζ 提交于 2019-12-22 04:42:34
问题 I have a listview which is customized to display an image and 2 textview. I just simply wanted to highlight one of the item from my list. Firstly, I go with setSelection method of listview which i finally found out it is not the way as it is not working in touch mode. So, I do some searching and found that I'd need to use setItemChecked method. Thus, I make a state-list color. <?xml version="1.0" encoding="UTF-8"?> <selector xmlns:android="http://schemas.android.com/apk/res/android"> <item

programmatically add css class to ListItem

折月煮酒 提交于 2019-12-22 03:32:22
问题 I need to produce with asp.net controls this structure, but ListItem doesn't allow add properties and classes. What is the best way to do it? <ul> <li class="1">SomeText</li> <li class="2">SomeText2</li> </ul> 回答1: You can pass-through class attribute: <asp:BulletedList ID="BulletedList1" runat="server"> <asp:ListItem class="1">SomeText</asp:ListItem> <asp:ListItem class="2">SomeText2</asp:ListItem> </asp:BulletedList> . . . protected void Page_Load(object sender, EventArgs e) { ListItem

returning clicked li class in an ul javascript/jquery

让人想犯罪 __ 提交于 2019-12-19 10:54:03
问题 My code (the html page): <nav> <ul> <li id="homeLink"><a href="#">Home</a></li> <li id="rekenLink"><a href="#">Rekenmachine</a></li> <li id="bakkerLink"><a href="#">Parkeergarage</a></li> <li id="garageLink"><a href="#">Bij de bakker</a></li> <ul> </nav> The javascript/jquery behind it: $(function () { $("ul").click(function () { // here I want to get the clicked id of the li (e.g. bakkerLink) }); }); How do I do that? 回答1: Use the .on() method with signature $(common_parent).on(event_name,

Set a CSS class on an ASP.NET RadioButtonList ListItem

时光怂恿深爱的人放手 提交于 2019-12-18 04:29:14
问题 Is there any way to set a CSS class on an input item in a radio button list? I'd like to reference these form values by class in jQuery. Given an ASP.NET RadioButtonList with classes set on the ListItems: <asp:RadioButtonList ID="RadioButtonList" runat="server"> <asp:ListItem class="myClass" Text="Yes" Value="1" /> <asp:ListItem class="myClass" Text="No" Value="0" /> </asp:RadioButtonList> Will render as: <span id="RadioButtonList" class="radioButtonListField myClass"> <span class="myClass">

How to prevent Button inside ListItem getting highlight

萝らか妹 提交于 2019-12-18 04:16:12
问题 So I have custom list item with buttons for a ListView. When pressed, the button display alternate drawable to show feedback to user. However when I click on the row, every buttons show pressed state as if I have clicked on them. How do I keep the button displays its original state instead of state_pressed? layout/List Item: <LinearLayout android:layout_width="0dp" android:layout_height="match_parent" android:layout_weight="1" android:orientation="horizontal" android:paddingBottom="10dp"

How can I disable a specific LI element inside a UL? [closed]

。_饼干妹妹 提交于 2019-12-17 23:44:38
问题 Closed . This question needs details or clarity. It is not currently accepting answers. Want to improve this question? Add details and clarify the problem by editing this post. Closed 2 years ago . I have a menu which is a <ul> . Each menu item is a <li> and currently clickable. Based on some conditions, I want to disable (make it not clickable) a particular <li> element. How can I achieve this? I tried using the disabled attribute on the <li> and list-style:none as well. Neither worked. Any