Set Active The First Tab In Menu?
Oct 3, 2011
! I'm making a tab menu with HTML, CSS and JavaScript. I have this HTML:
[Code]...
how to set active the first tab. I've tried with class='active', but when I use that atribute and click on another tab, the first one doesn't deactivate...
View 2 Replies
ADVERTISEMENT
May 18, 2010
i'm working on a horizontal menu based on this one [URL]).
When the user clicks on a menu item, the submenu container stays there on mouse out but... BUT when the user make over on another menu item and then makes out, the menu doesn�t return to active menu...
View 28 Replies
View Related
Aug 5, 2011
I am trying to change the look of the 'active' submenu item... Meaning, when you're on a certain page - the corresponding submenu item will look different (i.e. bold, different color, etc.)... URL is --> IDC's Fundamentals for Newer Directors JS code I'm using -->
$("*").find("a[href='"+window.location.href+"']").each(function(){
$(this).addClass("submenuactive")
})
View 16 Replies
View Related
Aug 19, 2011
I'm only adding this code to a few pages. I have the background changing over each linked hover, but is there anyway for me to allow one item remain that background color to indicate which page my visitors are currently on. If you can show me how to do one, I can figure out the rest. Code below.
[Code]..
View 2 Replies
View Related
Apr 11, 2010
I'm trying to add .active class to a menu, based on the URI. It works with URL's like: /, /products, /about, /contact but not anymore when you go to /products/some-product.I know what's wrong, but I can't find a working solution. I've tried a regex, but that didn't work either...
The code:
$(function() {
var path = location.pathname;
if (path) {
[code]....
View 4 Replies
View Related
Aug 16, 2011
I'm creating an accordion menu and need to make the link you click on go from saying "click here to view" to "close". The way I had to set up the accordion is making finding code that works very difficult. Here is my [code]...
View 4 Replies
View Related
Sep 13, 2010
I have a simple superfish menu on my site and I'm wondering if there is a way to add a quick line that shows the 'current' page the menu is point to?
this is a wordpress site, I noticed an example [URL] i'm getting closer?!
View 1 Replies
View Related
May 27, 2011
I've created a nav bar for this site - [URL].. I'm using javascript to handle the image rollover which is working just fine. However I want to add to this so that the current page will stay with the second or rollover image. How would you suggest I edit or add to my code so it keeps the second image active if it is the active page? In my script file this is what I'm using for an image:
menu1buttonup = new Image();
menu1buttonup.src = "http://web11.3essentials.com/~cp27358/wp-content/themes/origin/images/menu1.jpg" ;
menu1buttondown = new Image() ;
menu1buttondown.src = "http://web11.3essentials.com/~cp27358/wp-content/themes/origin/images/menu1a.jpg" ;
[Code]...
View 1 Replies
View Related
May 26, 2011
I've created a nav bar for this site - [URL] - I'm using javascript to handle the image rollover which is working just fine. However I want to add to this so that the current page will stay with the second or rollover image. Do I edit or add to my code so it keeps the second image active if it is the active page?
In my script file this is what I'm using for an image:
menu1buttonup = new Image();
menu1buttonup.src = "[URL]" ;
menu1buttondown = new Image() ;
menu1buttondown.src = "[URL]" ;
Followed by....
function buttondown( buttonname ){
if (document.images) {
document[ buttonname ].src = eval( buttonname + "down.src" );
}} function buttonup ( buttonname ){
if (document.images) {
document[ buttonname ].src = eval( buttonname + "up.src" );
}}
And this is what my list items look like:
<a href="<?php echo home_url(); ?>/?page_id=7" onmouseover="buttondown('menu1button')"
onmouseout="buttonup('menu1button')"><img src="<?php bloginfo('template_url'); ?>/images/menu1.jpg" name="menu1button" /></a>
View 1 Replies
View Related
Oct 9, 2011
I would like to get an active menu but when my page reload i loose the class.
With a button it works fine but not when the page reload with a href it only works when i add a #.
View 3 Replies
View Related
Sep 13, 2009
I'm using superfish for a drop down hover menu. It works perfect except I would like the sub menus to remain visible when one of the <a> tag from the menu has class="active". Here is a quick overview of the menu html:
<ul class="primary-links">
<li>
<a href="main">item parent 1</a>
<ul>
[Code]....
If the current page is main -- class='active' is automatically added to the A tag (with Drupal). If you are currently in page2, the class='active' is added to the A tag of the sub-menu. Now, how can I get the sub menu to be always displayed -- regardless of superfish, either when item parent 1 A tag is set as class='active'of the item child A tag is set as class='active'.
View 1 Replies
View Related
Jun 24, 2010
I'm almost done customizing the Superfish jQuery menu to fit my web site theme. I have all of the menu hover and submenu hover styles in place, but I'm having a problem with the color of the top-level menu item's font when the submenu is expanded. The active top menu item's background matches the hover color, but when I hover overa submenu item, the font color reverts back to the original (non-hovered) color. How do I get the top level menu item's color to match its hover color when the submenu is expanded?
The relevant portions of my CSS are as follows:
.sf-menu a, .sf-menu a:visited { /* visited pseudo selector so IE6 applies text colour*/
color:#8C1C39;
}.sf-menu a.sfHover {
color:#FFFFFF;
}.sf-menu li {
background:transparent;
}.sf-menu li li {
background:#FFFFFF;
}.sf-menu li li li {
background:#9AAEDB;
}.sf-menu li:hover, .sf-menu li a:hover {
color: #FFFFFF;
background:#00207B;outline:0;
}.sf-menu a:focus, .sf-menu a:active,
.sf-menu li li a:hover, .sf-menu li.sfHover {
background:#8C1C39;
color: #FFFFFF;
outline:0;
}
Attachments
TopHover.jpg
Size : 10.86 KB
Download : 505
SubHover.jpg
Size : 9.33 KB
Download : 510
View 1 Replies
View Related
Oct 25, 2011
I'm building a WordPress site with a nice jQuery effect that fades/unfades images within a navigation menu on rollover. So when the mouse moves off the image, the colored image should fade back to reveal the original non-colored image. This works perfectly as-is, but client wants the active page to keep its colored/ highlighted menu image when mouse has moved off of it. The bolded line of the code is where I tried to set that up...
Code:
<?php wp_nav_menu( array( 'container_class' => 'menu-header', 'theme_location' => 'primary' ) ); ?>
<script type="text/javascript"><!-- this is from [URL]-->
// make nav images highlight on hover
// when the DOM is ready:
$(document).ready(function () {
// find the navigation elements and hook the hover event
$('#mainmenu li').hover(function() {
// on hovering over, find the element we want to fade *up*
var fade = $('> div', this);
// if the element is currently being animated (to a fadeOut)...
if (fade.is(':animated')) {
// ...take it's current opacity back up to 1
fade.stop().fadeTo(250, 1);
} else {
// fade in quickly
fade.fadeIn(250);
}}, function () {
// on hovering out, fade the element out
if (!is_page(current)){
var fade = $('> div', this);
if (fade.is(':animated')) {
fade.stop().fadeTo(3000, 0);
} else {
// fade away slowly
fade.fadeOut(2000);
}}});});
</script>
<ul id="mainmenu">
<li id="home">
<a href="/home"><img src="<?php bloginfo(url); ?>/wordpress/wp-content/uploads/2011/09/sara_inactive.png" alt="home" width="152" height="309" /></a>
<div>
<a href="/home"><img src="<?php bloginfo(url); ?>/wordpress/wp-content/uploads/2011/09/sara_active.png" alt="home" width="152" height="309" /></a>
</div>
</li>
WordPress should know whether the page is 'current' or not, so why doesn't this work? Currently the nav images remain highlighted when the mouse moves away. If I remove my attempt (the bolded line of code) then nav rollovers work beautifully, but active page still isn't represented with a colored nav menu image.
View 9 Replies
View Related
Nov 17, 2010
It was originally an imaged based menu, but they wanted it all changed to css/html. I used quickmenu and it used JS to produce the arrows at the top of each menu item.I'm trying to program the menu items to stay active when on the current page. At first, it looks correct, but if you hover back over the menu, it changes back to the inactive state.
View 1 Replies
View Related
Jun 8, 2011
getting all the header text:jQuery("#accordion h3").text();how do you get the active index? and how do you use that index to get the active header?how do you get the header text for the active header?
View 1 Replies
View Related
Dec 5, 2009
I have a script that fades links on load and im trying to get this to work on everything but the menu link that has the "active" class
Code:
<div id="menu">
<ul><li id="Home"><a title="Home" href="/" style="opacity: 0.6;">Home</a></li>
<li class="active" id="projects"><a title="projects" href="/projects/" style="opacity: 0.6;">projects</a></li>
<li class="last" id="Contact"><a title="Contact" href="/contact" style="opacity: 0.6;">Contact</a></li>
</ul>
</div>
[Code]...
View 4 Replies
View Related
Mar 6, 2009
I think this is just a dumb question, I'm missing some basic logic here about jquery "grammar".
I'm trying to do an image swap on hover that checks to be sure the thumbnail is not the active thumbnail. So mouseover, it swaps. Mouseout, swaps back, unless the thumb has been clicked.
Here's a snippet of the code that doesn't work:
How do I check that _li is not ".active" and replace the src if it isn't?
View 10 Replies
View Related
Feb 15, 2011
I have trouble with SuperFish Menu, of course it looks very nice and is good solution, but I am not advanced in CSS language.how to change space between menu and submenu in Navi-bar type menu? Now sobmenu hide part of menu, I have to must space.....
Attachments
superfis.JPG
Size : 11.4 KB
Download : 306
View 1 Replies
View Related
Jun 3, 2009
The problem is that the height of the second level menu results in their being gaps in between each menu item so that as you move your mouse down the second menu items it quickly closes again. scripting novice fix this by telling me which variable I need to change either in the Java script or the CSS files.
View 2 Replies
View Related
Feb 7, 2006
I have the following which works in a jsp page
var obj = bew ActiveXObject(Tool.parsedatService);
var str = obj.test();
alert(str);
this prints out a string that i return from my activeX dll library .
now I add the following to the jsp and i now get a message which is a jsp
error object doesnt support this property or method..
my jsp has the following
<object id="RisTool" width="0" height="0"
classid="clsid: xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
codebase="http://localhost/RistoolX.dll#version1,0,0,1">
</object>
my jscript function
now looks like this
var str = RisTool.test();
alert(str);
View 3 Replies
View Related
Jun 16, 2007
if I call javascript like
<a href="javascript:;" onmousedown="toggle('a');">O</a>
is there a way to pass the element a to the function without specifying any
tags or names?
I want the function to automatically return a "pointer" to the a link that
it was called from instead of having to specify it.
View 8 Replies
View Related
Jan 6, 2003
Anyone know how to use javascript & active X to open an application? I have a web page and want my user to be able to open an application (i.e notepad) when they click on a button. How can this be done?
View 8 Replies
View Related
Jul 8, 2007
which code I can use for know if inner a select is there an option choiche?
I not want know which options someone have chosen; I want only know if there is one choiche in the select.
View 1 Replies
View Related
Jun 28, 2009
i have a list of thumbnails that are created dynamically from a database which have an transparency state when the thumbnail is in the active state (ie when someone clicks on it)I wondered is there anyway that the first one could be set to active by default when the page initially loads. My code is below:
<script language="JavaScript" type="application/javascript">
<!--
function setMainImage(imageId) {
[code]....
I wonder how I can highlight the active thumbnail so its background remains blue until I click another one.I also like to avoid the inline JavaScript.
View 10 Replies
View Related
Mar 4, 2011
[URL]...When you click the "More" tab, the browser forgets the active tab styling and current tab contents; I don't want these to change - all I want to change on the click "More" tab action is the navigation tab. But my browser should maintain the styling for the last active tab and continue to display its corresponding tab contents. Yet it forgets these details when the user clicks "More".
In particular, when user navigates back and forth between the two tab sets, whatever was the last styled active tab remains styled as such. Browser should remember this.
$(document).ready(function() {
//When page loads...
$(".tab_content").hide(); //Hide all content
$("ul.tabs li:first").addClass("active").show(); //Activate first tab
$(".tab_content:first").show(); //Show first tab content
//On Click Event
$("ul.tabs li").click(function() {
[Code]...
View 4 Replies
View Related
Oct 22, 2009
How do i close a specific window. (not the active one) with javascript. the reason im asking is because i have a form submitting to another page AKA TARGET_BLANK. but i have it target blank because that page checks if the stuff from the form can be inserted into the database.
BUT IF IT CANT, i give them a close(the active page) link and it closes the second page(that says oh u didnt fill in a title THE ERROR blah blah blah) so that the user can fix the first page(the page didnt reload itself or close so the information can stay and not be lost(form inputs, textarea texts etcc)
But what if the user submits a correct form and it says so on the 2nd page. and then close that page right AND THEN... theres the first page there left un touched. how can i get page 2 to close page one. with javascript.
View 4 Replies
View Related