- This topic has 7 replies, 2 voices, and was last updated 15 years, 9 months ago by imported_Ryan.
-
AuthorPosts
-
January 30, 2009 at 1:31 pm #601haggisMember
Hello!
I’m using version 1.6
You can see the site without permalinks at http://www.ikum.de and at http://www.stuermi.com/wordpress with permalinks activated.As you can see, navigation elements with children have i.e the class "page_item page-item-7 haschildren".
But with permalinks activated it’s "page_item page-item-7". So I have no way to give the haschildren-elements a special style.
I’m not able to locate the problem. All CSS-files are reacheable.Is any workaround out there?
Thx,
HaggisJanuary 30, 2009 at 2:14 pm #5129imported_RyanMemberNo idea sorry. The haschildren CSS class is just a preliminary feature at this stage. We haven’t even started integrating support for it into the CSS generator.
If you figure out where your problem is I’d love to hear about how you fixed it.
January 31, 2009 at 1:00 am #5130haggisMemberok, here’s the fix:
[code:2ccdve26]
function pages() {echo ”, ereg_replace(""><a [^<]+</a>([tn]+)<ul"," haschildren\0",wp_list_pages(‘title_li=&exclude=’. get_option(‘suckerfish_excludepages’).’&echo=0′)) , ”;}
[/code:2ccdve26]
-> [^<] instead of [/?a-zA-Z0-9-."=_ >]
but I think the old regexp should have matched, too:[code:2ccdve26]
regexp: "><a [/?a-zA-Z0-9-.:"=_ >]+</a>([tn]+)<ul
string: "><a href="http://example.com/index.php/page-name/" title="some title?">Some title?</a><ul
[/code:2ccdve26]Anyway, to style an element with childs you can use "#suckerfishnav li:hover.haschildren" for all browsers except IE<=6
To do so you have to expand the suckerfish_ie.js in a way like this:
[code:2ccdve26]
<!–//–><![CDATA[//><!–
sfHover = function() {
var sfEls = document.getElementById("suckerfishnav").getElementsByTagName("li");
for (var i=0; i<sfEls.length; i++) {
sfEls[i].onmouseover=function() {
if((this.className.search(/haschildren/)) != -1) {
this.className+="sfhover";
} else {
this.className+=" sfhover";
}
}
sfEls[i].onmouseout=function() {
this.className=this.className.replace(new RegExp(" sfhover\b"), "");
this.className=this.className.replace(/sfhover/, "");
}
}
}
if (window.attachEvent) window.attachEvent("onload", sfHover);//–><!]]>
[/code:2ccdve26]Now you can style these elements in a "style_ie6_fixes.css" with "#suckerfishnav li.haschildrensfhover"
Hope this will help someone!
January 31, 2009 at 1:50 am #5131imported_RyanMemberThanks for the code improvement ” title=”Smiley” /> I’ll add this to my list of future improvements.
Do you have a website you would like linked to in the credits for the plugin?
January 31, 2009 at 2:49 am #5132haggisMemberYou scratch my back and I’ll scratch yours. ” title=”Smiley” />
Unfortunately I haven’t got a personal website yet. Thanks for asking!
February 7, 2009 at 11:47 pm #5133imported_RyanMemberJust post back here when you so and I’ll be happy to add a link for you ” title=”Smiley” />
February 10, 2009 at 3:32 am #5134haggisMemberHi Ryan!
Have a site since yesterday! But it’s still under construction ” title=”Wink” />
My first post was about your navigation plugin, so feel honored *g*Greetz
HaggisFebruary 10, 2009 at 9:52 am #5135imported_RyanMemberThank you ” title=”Smiley” />
-
AuthorPosts
- You must be logged in to reply to this topic.