Is there any good way of achieving this?
My problem is that when I select something in carousel 1 the page is being refreshed and the items in carousel 2 which would have been choosen dependent on what I choose in carousel 1 is being selected. But since the page refreshes the selected item in carousel 1 is no longer selected..
A bit of catch 22, cause if I set the code not to refresh the page I can select everything but carousel 2 never gets updated dependent on what was choosen in carousel 1..
Anyone have had a similar problem?
Must be some solution to this =)
If the selection triggers a link you can add some GET parameters to express what you just selected. Once the page reloads you can read them and build your page's view state accordingly (like: http://mypage.tld/carousel.html?selected=1).
http://papermashup.com/read-url-get-variables-withjavascript/
Related
This should be fairly simple, probably too simple, given I cannot find the API reference as of how to control it.
I am using https://swiperjs.com/ to build a simple slider of images.
Specifically, this one https://codesandbox.io/p/sandbox/5nclhv?file=%2Findex.html
Now, I want the slider to start at Slide Item 2, not item 1.
Yet, I cannot find any single option or API control to offset the initial pagination by one.
What am I missing?
You can use https://swiperjs.com/swiper-api#param-initialSlide:
initialSlide
This parameter has default value 0 and defines the index number of initial slide.
Thus, setting it to 1 will make the slider start at the second slide item.
I'm still pretty new to Vuetify and try to learn with the docs and forums but I've come across a problem :
I couldn't find a way to disable only one button of the pagination component.
Example :
A user is on page 2. I want them to be able to go to page 1 but to prevent them from going to page 3 until they meet certain conditions.
The problem is I saw that the "disabled" prop can only be a boolean on the pagination component (thus disabling the whole component).
Does anyone know a way to achieve that? Might it become a feature request?
Thanks in advance
I am trying to create an effect similar to this (the demo uses Bootstrap Carousel):
https://codepen.io/SitePoint/pen/BpVrXP/
Bootstrap's 'slide.bs.carousel' returns a relatedTarget that is the slide element going to be displayed as soon as the carousel is moved i.e changed to another slide.
I haven't been able to find an equivalent data being returned in OwlCarousel2's changed.owl.carousel event. What event, if any, returns the element that's going to be in view?
Is there any alternative way or am I missing something?
Try the event translated.owl.carousel, translated is fired after the animation
I have a dataview list view working in another part of my application and is working fine. So I'm using the same principle in another view. I'm trying to display some labels in each row.
I've tried everything to try and get this to work, but to no avail. I've attached a screen-shot of the problem.
It appears the label is in fact in the DOM, but nothing displays. It also looks like if I select an item, the item selected class isn't added either. Is this a clue as to why it isn't working?
So if the item is in the DOM, why on earth is it not being displayed? In my example I have 2 rows in the DOM, which I inspected using the following selector:
Ext.DomQuery.select(".x-data-item");
Any help greatly appreciated?
I use Tapestry 4.1.1 and i need to change the order in wich some components are rendered in a tapestry application page.
I have the following in HTML:
-start of page
-component1 (a map showing a location)
-component2 (a resulttable contrib:table)
-end of page
the resulttable gets 90 objects to show. It is paged. 10 objects per page. 9 pages.
Becouse tapestry handles the sorting order of the objects i don't know wich objects will be displayed. I think i need to wait for it to render to know exactly what is being shown to the user?
component1 shows a location on the map. It needs an identifier from one of the objects displayed in the resulttable. Not any identifier. one of the 10 being displayed out of all 90.
I use the 'row' binding setRow(Object 0) to know wich objects are displayed. The method gets called 10 times. This is perfect.
I then need to pass the identifier to component1. Becouse in the HTML component1 comes before component2 it will be rendered before rendering the resulttable.
I tried placing component2 before component1 in the .page specification but that makes no difference. Only by putting component2 before component1 in the HTML did the trick.
i really hope someone can help me out here becouse i have been stuck for a while now and i really need to get this to work.
Thanks in advance for any help!!
Could this be done using JavaScript on the client side? What you want to do is much easier in Tapestry 5. In Tapestry 4 you can do some wierd tricks, like rendering the table first, capturing its output HTML, than inserting it later on the page.
Alternately, you could provide the correct model objects to the contrib:Table (rather than let it handle all the pagination work) and that way you'll know, before it renders, exactly what it will be rendering.