question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

how to use jquery css in embedded mode?

See original GitHub issue

Hi,

nglview is using jquery-ui for player slider. Things are fine in notebook but the player is not displayed in jupyterlab and in html embedded mode.

Is there any idiom to make the UI work in non traditional notebook? thanks

Notebook

screen shot 2017-08-20 at 7 54 21 pm

embed

screen shot 2017-08-20 at 7 54 14 pm

Code

the code is here: https://github.com/arose/nglview/blob/master/js/src/widget_ngl.js#L5-L7

(PS: I tried to add “require(‘jquery-ui/themes/base/slider.css’);” but won’t help either). thanks.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
hainmcommented, Aug 31, 2017

I think I solved the issue.

Just for the record.

First, include

require('jquery-ui/themes/base/all.css')

then update webpack.config.js

var loaders = [
    { test: /\.json$/, loader: 'json-loader' },
    { test: /\.css$/, loader: "style-loader!css-loader" },
    { test: /\.less$/, loader: "style-loader!css-loader!less-loader" },
    { test: /\.(jpg|png|gif)$/, loader: "file" },
];
screen shot 2017-08-30 at 9 10 38 pm
0reactions
hainmcommented, Aug 29, 2017

Hi

Yeah that PR include css in html file. But that won’t help if we want to use sphinx-jupyter

Hai

On Tue, Aug 29, 2017 at 2:39 AM Pascal Bugnion notifications@github.com wrote:

Is this still an issue? I note PR 687 https://github.com/arose/nglview/pull/687 seems to fix it?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/jupyter-widgets/ipywidgets/issues/1666#issuecomment-325569611, or mute the thread https://github.com/notifications/unsubscribe-auth/AEPudUFHby6D2YO7RgBcffEVojHRIPlwks5sc7I2gaJpZM4O8xK6 .

Read more comments on GitHub >

github_iconTop Results From Across the Web

.css() | jQuery API Documentation
The .css() method is a convenient way to get a computed style property from the first matched element, especially in light of the...
Read more >
jQuery CSS - Write into the <style>-tag - Stack Overflow
jQuery always adds its CSS in the tag itself. I think you should use the append() function with a new body style rule....
Read more >
jQuery Get Started - W3Schools
There are several ways to start using jQuery on your web site. You can: Download the jQuery library from jQuery.com; Include jQuery from...
Read more >
jQuery and Ajax Tutorial
jQuery adds many custom selectors on top of CSS selectors (marked with CSS). These selectors begins with a colon ':' , similar to...
Read more >
How to Create Dark/Light Mode for Website using JavaScript ...
How to Create Dark/Light Mode for Website using JavaScript/jQuery? · Create an HTML Document. · Create CSS for the document file as well...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found