TremulaJS
TremulaJS copied to clipboard
Set selected element
Hello,
I wanted to be able to trigger a "tremulaItemSelect" and not only listen to that event. Is it possible? I've tried using Grid.getLastSelected() and Grid.getClosestScrollOriginObj() but neither seem to be useful.
Thank you.
Can you describe your use-case?
I have a slideshow at the bottom of my page with cars and the selected car's detailed info is presented in the top of the page. On page load I want that the information related to the first car of the slideshow to be presented in the top part.
@jpgamaral, sorry for the delay. I think the easiest way to solve this is with something like $('.gridBox').filter(':first').click()
. Just call this when you want the first item shown -- it should behave just as if it's been clicked. There are many other ways to do this but I think this answer requires the least knowledge. I hope that helps. Please let me know if this does not solve the problem -- (I didn't test this code)