My problem is that the site I am current working on is set up with bootstrap 5 and has offcanvas class that seems to be causing a lot of issues based off its z-index. I recently added the jquery autocomplete api based off of a request to remove the old one. I am trying to use the 'appendTo' method to ensure that the dropdown for autocomplete doesnt move when scrolling but every time I add the ui-front class to the offcanvas element I want to appendTo I cant see the autosuggest anymore. I assume the code isnt breaking as im not getting any errors but im not sure how to about fixing this.
I have used the grouped dropdown component from PrimeNG, I want the dropdown's
First section to have a toggle button.
Second section to have options which would work as a select component works.
I need suggestions on which component could be used as a base component to create a similar functionality. Like shown in the image https://imgur.com/NHIIoIO
I was able to use this component (https://www.primefaces.org/primeng/#/dropdown) to style the dropdown to look like the wanted component, missing the toggle button section, But when the toggle button is added in to the dropdown template, and the toggle button is clicked the dropdown closes.
I just want suggestions on the component shown in the image, not looking for code.
You can use ng-zorro for a similar output.
Here is the link of documentation.
https://ng.ant.design/docs/introduce/en
Also, I have created a sample similar to the question in Stackblitz
You can check it here
https://stackblitz.com/edit/custom-dropdown-template-using-ngzorro
I'm having trouble to get things right with the Bootstrap Dropdown. I can't use react-strap and reactbootstrap is not supporting bs4 yet.
What I want is that a dropdown doesn't close if if select an element and only if I click outside of the dropdown menu. I don't want to use jQuery and would like to stick to react. I was thinking of removing data-toggle="dropdown" form the dropdown element, as this seems to be the one that adds the show class to the dropdown-menu. After that I would try to implement my own logic, so that it follows my rules.
But still, because I hope that there is an easier/better way, I wanted to asked if anyone has any experience with that?
I use different list in one page with each list have some Option button,
you can take a look at my codepen : [http://codepen.io/harked/pen/WvMgXg][1]
If we swipe the first card, it will show the option button.
If we swipe the second card, it will also show the option button.
Is there any way to prevent Option-Button to show while the other in another card is showing?
I mean the problem is like this pict : http://www.nanonimos.com/IonOption.jpg
Anyone? It would be greatly appreciated.
It doesn't look like Ionic have a way to do this right now. What we need is a listener on the option buttons being display, at which point you can close all others, but that listener doesn't exist.
You could build custom functionality and listen for swipe events on each ion-list item, but this is likely to be a little buggy. Alternatively dig into the framework and try and emit a custom event on the same trigger than Ionic uses.
You probably have an ng-repeat when working with lists in Ionic. You can easily disable Option buttons using ng-show as in this codepen.
[http://codepen.io/anon/pen/vORyaz?editors=101']
I've had a search and I couldn't find anything & also it's my first time using the site so hope it hasn't been asked.
I've run into a situation. I'm by no means an experienced website maker. I'm learning as I go. I have a CSS drop down menu that works fine on desktop browsers. When I get into the realm of mobile I encounter a problem, namely that :hoverdoesn't work (obviously).
I found this : http://osvaldas.info/drop-down-navigation-responsive-and-touch-friendly but I can't get the ruddy thing to work.
The page in question I'm applying it to is here : http://www.inkslinger.co.uk/calibre/index.html I really can't work this out and its driving me absolutely batty. Any help would be really appreciated.
I had the same problem and found an easy workaround which I have used here
hover example
The Post Natal and Ante Natal options, when hovered over, trigger the drop down, but you may notice that they are NOT links themselves. In my original model they were links, but when I realised this would not work on touch devices, I simply made them into triggers for the drop down boxes, and put the links inside the boxes too. So for you, your 'What we do' link, would not be a link, just a trigger for the dropdown menu, and then in the menu you can have your link to the 'what we do' info.
It is also worth remembering that certain touch devices, such as some iPads, do not like hover states at all, if you find that the hover state won't trigger your dropdown menu, then add 'onclick="return true"' to the list item in question. This will usually make the hover state work like a click.
Hope this helps, what I've written represents about 3 days of poring over my library of reference books.
We had this problem and changed the hover to clicks.
Instead of using hover, which is of course impossible on touch devices, using :active would likely be a good start. Selection something is still possible on touch devices, bind the menu to the active state of a toggle and you're done.
You will have to switch from hover to click event for this case. There's no workaround for that.
You should definitely consider changing your design to have a hamburger styled menu which opens from left for touch devices.
See this demo from the link that you posted. It changes to a different menu style when you open it in mobile device.
http://osvaldas.info/examples/drop-down-navigation-touch-friendly-and-responsive/
Also if you want to have your top link as a direct link to other page; you can have two separate clicks on the top button for that. First click will open the menu and after the menu is opened you can assign the direct link to it as done in the above demo.
Put this line of code inside your head tag like this:
<head>
<script>document.addEventListener("touchstart", function(){}, true);</script>
</head>
Create for your hover element an active class like this:
element:hover, element:active { Your CSS }
Voila.