JQuery :: Set Active Class To Repeater Menu?
Mar 15, 2011I've a Masterpage in wich there is a repeater binded to a sitemap.
[Code]....
I want to set active class to tag <li> when user click on menu item using jquery.
I've a Masterpage in wich there is a repeater binded to a sitemap.
[Code]....
I want to set active class to tag <li> when user click on menu item using jquery.
I've this html code:
[Code]....
I want to add "active" class to tag <li> when user click. And..there is a way to set "active" class when user come back to a page after login?
I'm looking for a good jQuery or CSS, or combo, library to enance my left side menu in an an intranet application. I don't like the 'hover only' expand/collapse style of the ASP.NET Menu control on its own, and I don't like the 'icon-click only' expand/collapse style of the TreeView control on its own.
I plan on trying the CSS Control Adapters, to render the menu with some self-respect, i.e. as nested <ul> or <ol> elements instead of the usual orgy of tables. Beyond that, I need something to give a bit of style and menulike behaviour to these nested lists, and I would prefer a jQuery plugin for this. Which should I use?
I am trying to implement dropline menu using asp.net menu control. I found JQuery dropline code @ Dynamic Drive & currently using CssFriendly Adapters to get neet CSS, but i am unable to implement it as menu control renders its own css names.
View 1 RepliesI would like to control the menu display (show/hide menu items) in my ASP.NET 3.5 website based on the user's AD group and also control the functionality within a page using user's active directory group membership. how to do this? menu is stored in an xml file and bound to a control. all the examples I see on the web are related to forms authentication. this is an intranet website with integrated windows authentication and both authentication and authorization should be controlled using user's active directory groups.
View 1 Repliesi wanna use to subsonic 3.0.4 but i dont know, how can i start to generate class and use to new Template of T4. example: create new solution for generating to table's class and add to my project. ??
View 2 RepliesI have been able to extend the system class DirectoryEntry by adding static methods like setSAMAccountName, setMail, setPassword, etc.But my goal is to set them like parameters in the form of de.Mail = asp@net.com...Is there a way of doing this without extending the DirectoryEntry class? becose when i run the code de.Childen.Add ... the method implementation returns a DirectoryEntry and not my extended class.
View 1 RepliesI have a .aspx page where i copied 1 navigation bar. On it i put some link buttons. They are navigating. But when I click it's class should become Active <li class="active">Home</li>. If i click on register link button then register's class should become active.
View 1 Replies[Code]....
Using class to pull Active Directory Information for forms
I wrote a class to pull adinfo and for the life of me I can't seem to figure out why it says "Invalid Login Name" no matter what I type in. If I leave it blank it seems to work properly but it doesn't seem to be actually searching the AD. I'll drop the whole class here, it's being initiated by a button click on an outside form.
[Code]....
How to use pop up menu using JQuery(Like Menu Control..)
View 1 RepliesI'm having trouble managing how to call upon databind from clicking on a row over an already populated repeater that will populate data regarding the row clicked TO another repeater on the same page.
I've succeeded doing that with postback, calling a jquery click event of that row, taking the data of the specific row and passing it onto a "Querystring" and after postpack, it will be pushed into a Session which the ObjectDataSource of the secondary repeater will recognize and populate the data tables accordingly.
The problem is, I must do it without a postback or in other words purely on client side.
I have this menu which has z-index of 600.I also use autocomplete, and I set the zIndex option to 700, I also tried setting the z-index in the css file, but no matter what i do, the ul list the autocomplete script generats always has z-index of 1.
this is what i see when i "inspect element" using chrome(the results ul):
[Code]....
no css alteration will help there, since its written into the style attribute of the ul element, and the zIndex option of autocomplete seems to do nothing also.for now, i can handle it by simply setting the z-index of the menu to 0, but thats a realy dirty workaround since i do want to control the z index of the autocomplete results ul.
My scenario is to drag an item from a repeater/datalist to another repeater(preview repeater). The preview repeater already contains some icons in some positon(for eg. in 1st and 4th items). I need to insert the icon to empty positions(2nd, 3rd and 5th items) in preview repeater.
View 4 RepliesHow to add submenu to particular menu using repeater control...
View 1 RepliesI was browsing the net a week ago and now I cannot find the coolest menu I've ever seen. I can only describe it the best I can...
I know that it is a jQuery plugin, just don't know the name of it. It uses a left and right arrow to browse through a list of items, the item in the center is large, and all the items around it are smaller and somewhat transparent. When you click the arrow, the item to the left or right of center transitions into the center, and the rest of items rotate backward, in a circular motion. It is similar to a carousel, but the items are arranage in an oval/circular manner, and clicking the arrows left or right slide the next item to the center and make it larger.
If anyone knows what I am talking about that would be such a huge help!
Also, I am looking for a way to make a div with rounded corners with about a 10px transparent edge all the way around, but not transparent for the content inside the div.
I haven't been able to find it if there is. Note - my issue is with a background-color, not a background image. Anyway, after having spent most of an entire day trying to fix this problem & unsuccessfully sourcing help on the web I thought now that I've managed to resolve my issue I'd post my solution here to keep someone from suffering the same headache.
Basically in my asp.net solution I have a div which has a mouseover class toggle bound to it. Within that div I have several divs which contain HtmlAnchors & Images (<div><a><img /></a><div>). These divs also have a class toggle bound to them. So, herein lies the issue:
[Code]....
when skipping between the .Div2s, '.Div1' would suffer from a flicker which looked terrible. (This only happened in internet explorer!) The fix I finally came up with was to set a timeout on the class-toggle of .Div1
[Code]....
This works for me in ie6-8! Phew! Time to get away from my computer.
Im using repeater to create dynamic ul li listIs it possible to control class whether item is first or last ?sth like :
class="<%# if(Container.ItemIndex == 0)
{
class = ...
[code]...
Populate Menu and SubMenu Dynamically from Database using Repeater control in ASP.Net.
View 1 RepliesI am using Asp.Net web-application. How exactly to create UL menu with ListView control such as :
<ul> <li> <a href="#">Item #1</a> <ul> <li> <a href="#">SubItem #1</a> </li> </ul> </li></ul>
MenuId SubMenuId MenuName MenuUrl
1 0 Home Home.aspx
2 0 Administration Administration.aspx
3 2 Add User AddUser.aspx
4 2 Add Organizaion Add Organizaion.aspx
5 2 Add Program AddProgram.aspx
6 2 Add Activity AddActivity.aspx
7 0 Search Search.aspx
8 0 Utilities Utilities.aspx
9 0 ContactUs Contact.aspx
i want to show an alert message like this page http://jqueryui.com/demos/dialog/#animated
now my project structure is from default.asxp.cs button click event i call an Alert.cs fils in Alert.cs file i have written an code like below
public bool ShowAlertMessage(string error)
{
ScriptManager.RegisterStartupScript(page, page.GetType(), "err_msg", "alert('" + error + "');", true);[code]....
now the alert message is very simple. i expect the alert message like the above link so, what i have to do in Alert.cs why i would like to do in Alert.cs is lot of pages refering this class only so that without any other changes my project will work.
I have a menu (linked to a sitemap) wrapped in to a panel surrounded by a round control extender. The menu has StaticMenuItemStyle, StaticHoverStyle and StaticSelectedStyle. The first 2 works like a charm but not the StaticSelectedStyle. On click of the menu item the screen is redirected to appropriate page, but the menu item cssclass is set back to StaticMenuItemStyle. The background of the menu items are images. I tried some of the solutions from other posts, but no use.
View 8 RepliesI've uppgraded to version 4 of framework and notice that menucontrol is now able to render as <ul><li>, witch is perfect. But I notice that it adds a style element and set class for each node.
renderd page html
[Code]....
Is there a way to remove this so I can set my own style?
I'm having a little problem with the popout icon in the ASP menu control not appearing when the sitemap node doesn't have a URL. Take the following sitemap nodes as an example:
<siteMapNode title="Top 1" url="~/Top1.aspx">
<siteMapNode title="Sub 1" url="~/Sub1.aspx" />
</siteMapNode>
<siteMapNode title="Top 2">
<siteMapNode title="Sub 2" url="~/Sub2.aspx" />
</siteMapNode>
The first top level item - Top 1 - gets a popout CSS class written to the tag that spans the label. However the second top level item - Top 2 - does not get the class. Given this class is generally used to hold the arrow indicating there's more content beneath the item there's a bit of a usability problem here. Does anyone have a workaround for this? Or alternatively, is a sitemap node without a URL attribute somehow breaking the intended usage of the control?
I am using an ASP.NET 4.0 Menu control with RenderingMode=List and am struggling with creating the appropriate CSS. Each menu item is represented by an <li> tag that contains a nested <a> tag with what appear to be fixed class names:
<a class="level1"> for unselected level 1 menu items
<a class="level2"> for unselected level 2 menu items
<a class="level1 selected"> for the selected level 1 menu item
What I want to do is to is to prevent the currently selected menu item from being "clickable". To do so I tried using:
if (menuItem.Selected) menuItem.Selectable = false;
This has the desired effect of removing the href attribute from the <a> tag but also removes the class attribute - and as a result my CSS can not identify what level the menu item belongs to! Looks to me like a possible bug, but in any case I can't find any documentation describing what CSS class names are used, nor whether there is any way to control this (the old Style properties don't appear to have any effect). Ideally I would like to have "level" class attributes on the <li> tags, not just the nested <a> tags.
UPDATE
I've taken a look at the System.Web source with Reflector, and it appears that it does explicitly skip outputting CSS attributes if Selectable=false. The following is extracted from MenuRendererStandards.RenderItemLinkAttributes:
if (!item.Selectable)
{
return needsAccessKey; // !! exits without setting class attribute
}
if (item.Selected)
{
cssClass = cssClass + " selected";
}
writer.AddAttribute(HtmlTextWriterAttribute.Class, cssClass);