I have a master table with many detail tables and have enabled Use button dropdown for links . It works fine. The problem is if the user clicks on options for the record near the bottom of the page , all the items in the dropdown are not visible as some of them get hidden below the page bottom. Is it possible to move the page up or to display the options as dropup(riseup to be precise) instead of dropdown if there are links in the options that are hidden so that they are visible to the user
How to scroll to the row clicked using jquery?
-
- User
- Posts: 1601
Use jQuery to find the last row (see api.jquery.com/last-selector/) and add class dropup to <div class="btn-group">. This will make the dropdown menu become dropup. View the page source to find the element that you want to add "dropup". The jQuery code need to put into Client Scripts->Table-Specific->List Page->Startup Script.
-
- User
- Posts: 84
By last row i meant the last visible row on the screen. there may be more rows if one scrolls down. what i required was that when the user clicks on the options dropdown the list should be down or up depending on the space available on the screen.or the scrollbar can be moved to accomodate the options
-
- User
- Posts: 84
The following code in the Global Client script will scroll the row clicked to the top of the page.
$(function(){
$("table tr").click(function(){
$('html, body').animate({
scrollTop: ($('#'+this.id).offset().top)
},500);
});
});