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

CSS not loaded using yepnope (works when yepnope.injectCss is used) #162

collinforrester opened this Issue Apr 22, 2013 · 2 comments


None yet
2 participants
Copy link

collinforrester commented Apr 22, 2013

I'm trying to add c-grade browser styles as a fall back if jQuery Mobile determines so.

I'm finding that my c-grade.css isn't loading when I use the preferred syntax of yepnope() but it WILL work if I use yepnope.injectCss().

    test: true, // myTest
    yep: 'c-grade.css',
    complete: function() { alert('is complete'); },
    callback: function() { alert('is callback'): }

Neither of the alerts show and the styles are not loaded.

yepnope.injectCss( 'c-grade.css', function() { alert('is done'); });

Works just fine. I'm getting these results on a Blackberry 8530 (5.0 :/ ).
Is there any harm in me just doing

if( myTest ) {
    yepnope.injectCss( 'c-grade.css' );

This comment has been minimized.

Copy link

SlexAxton commented Apr 22, 2013

There's likely a bug where css that's last can get lost in the execution stack. We're rewriting in 2.0 right now to solve those things. Your way is totally fine, and probably a tiny bit faster.


This comment has been minimized.

Copy link

collinforrester commented Apr 22, 2013

Thanks! I'll leave it and wait for 2.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.