I have an angular app with a scrollable sidenav.
This sidenav has the native ugly scrollbar. I want to replace this one with a styleable scrollbar.
Are there any good solutions for angular 2 which don't require jQuery?
Do I have to use an external JavaScript solution which doesn't rely on angular?
Thanks in advance!
PS: If important, I use Angular Material 2
PPS: I've already tried gemini-scrollbar, but this has broken the width of the sidenav and simplebar which has caused a ram overflow.
Edit:
I want to replase this ugly scrollbar:
Try using the OVERVIEW EXAMPLE its better than Example tap section
this one:
You don't need JQuery to archive this task. It's pretty simple and easy to use ADD to do this. There's a example in this link https://css-tricks.com/almanac/properties/s/scrollbar/
Related
I want to figure out a way to handle responsiveness by reordering divs. I am trying to look for the most flexible solution but any is fine.
View for desktop:
View for Mobile:
Bootstrap has a nice system for this out of the box. You can push/pull columns around at different screen sizes. Doesn't require any javascript, just some new classes. Check out their documentation:
http://getbootstrap.com/css/#grid-column-ordering
And a good tutorial on it:
https://scotch.io/tutorials/reorder-css-columns-using-bootstrap
Use the push pull classes to reorder them when you you are in a larger view. Bootstrap has a whole section about this here: http://getbootstrap.com/css/#grid-column-ordering
Is that possible to resize two divs simultaneously using their common edge using html and css only? Is there some Angular2 way to do it?
I tried play with resize:vertical style but without luck:
enter link description here
I was hoping that outer div could limit resizing but it seems I was wrong.
PS I don't want to use jquery or work with elements directly from code because I work with ng2 and it is not a good approach to use such hacks, but I didn't find such functionality in ng2
Try ng2-split-pane. Not sure if this is what you need but there is a quick demo on the page that should clear that up.
It works by inserting a dragging anchor between two divs with the option of orienting them vertically or horizontally.
https://github.com/wannabegeek/ng2-split-pane
Have you tried
display: flex
display: flex-box
I am trying to implement a webpage like the mockup I've posted. I tried looking for some jquery libraries that can help me achieve this task, but havent found any yet.
The idea is to make three separate scrollable grids, all three should occupy the entire browser screen, and the header bars should be able to hold text at the center.
Any help that would put me in the right direction will be a great help.
Try with this plugin: jScrollPane / http://www.kelvinluck.com/assets/jquery/jScrollPane/jScrollPane.html
Demo in jsfiddle: http://goo.gl/hG9CV
You don't really need to do this using jquery, Simple CSS would work, just use position:fixed to position the divs and overflow:scroll to create scrollable element.
See a sample fiddle
All,
I'm using Wordpress widgets but I'd like to create a widget that floats down with the page as your scroll. Has anyone ever done anything like this? If so, can you give any recommendations on how to achieve such a widget? Is it done merely by Javascript/CSS?
Thanks!
The easiest way - to install this new WordPress plugin - Q2W3 Fixed Widget
It was specifically designed for this purpose!
Screenshots
All you need to do is set the position of the element in question to fixed via CSS, i.e.
.myFloatingWidget {position:fixed; left:0px; top:50%}
You need to give the widget a style of position:fixed;. Example at W3Schools.
slashnick's and maxedison's solutions will work.
If you'd like to have a dynamic scrolling box that doesn't always stay on the screen or minds the header, footer or any other div of your site, you might want to check out DropTheBit's sticky float jQuery plugin: http://dropthebit.com/74/sticky-floating-box/
Is there a javascript library which lets me do the horizontal scrolls effect kind like github does when you click on a file/folder.
Preferrably jQuery plugin.
thanks
Looking at the source for github, it seems they use jQuery.animate to slide the content to the left.
$("#id").animate({
marginLeft: "-1200px"
});
Example on jsfiddle
For a more in-depth answer, GitHub actually wrote about how they've assembled their directory structure on their blog.
But yes they're using jQuery for the actual effects themselves. They mention using slideTo() in that post, but in the end it's really just an $.animate() effect.
maybe you want to look into jQuery.ScrollTo, a jQuery plugin really usefull for this kind of effects.
You could have like github a div with a overflow:hidden containing your slides or pages and above the same kind of links than in the jQuery.ScrollTo example page.