Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

<a> missing when integrated into WordPress wp_nav_menu #32

Closed
amitkvint opened this issue May 23, 2013 · 5 comments
Closed

<a> missing when integrated into WordPress wp_nav_menu #32

amitkvint opened this issue May 23, 2013 · 5 comments

Comments

@amitkvint
Copy link

Hi there,

I am have a navigation menu with links styled with lettering.js (a jQuery plugin).
On HTML / SASS works perfectly.

When I try to integrate that into WordPress everything's works well...a part from the tag is not wrapping anymore the nav links :( that's obviously a problem...what I do get is the that is created by lettering.js and of course my other styling, but no tags so can't really be used as a menu if you know what I mean...

Am I missing something ? Anyone with some kind of idea ? similar experience ?

Thanks,
Amit

@davatron5000
Copy link
Owner

Lettering is unable to preserve HTML, so if you have tags within something they'll get stripped out. I recommend scoping your selector to something like:

$('nav a').lettering(); 

@amitkvint
Copy link
Author

Hey thanks god that was quick...

Can you please try and explain some more...I am not such a skilled jQuery developer, usually do more PHP, HTML, CSS...just lately some jQuery

Thanks!

@davatron5000
Copy link
Owner

Yeah you may want to ask these kinds of questions on Stack Overflow, I try to keep this for bugs and problems with the software.

I'd need to see code, but you're probably trying to select something like $('.mynavigation').lettering(); when you need to select each individual link like i said above $('.mynavigation a').lettering(); Just like CSS, you gotta point your lettering() at the specific element/class you're trying to target.

@amitkvint
Copy link
Author

Oh thanks...I haven't seen your comment but have manged to actually follow what you said, you are right before I have targeted $(".prep").lettering('words'); &amp; now $("nav a .recuperar").lettering('words'); and I have back my tags ... but now the lettering affect does not work. All I have is it does get the extra

    , with all the DOM that WP throws there...if I bather you just let me know I'll try Stack Overflow / WP forums

    Thanks anyhow,
    Amit

@amitkvint
Copy link
Author

It's 00:05 here in Spain and I did it!'
it's a pretty amazing work-around had: to strip the WP nav UL LI, had to count the elements with CSS, so no classes to the nav a & OLE! like the say here in Spain!

Thanks for your help! sorry to bather you.
Amit

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants