highlight the navigation menu for the current page

CSS: .topmenu ul li.active a, .topmenu ul li a:hover { text-decoration:none; color:#fff; background:url(../images/menu_a.jpg) no-repeat center top; } JavaScript: <script src=”https://stackoverflow.com/questions/4626431/JavaScript/jquery-1.10.2.js” type=”text/javascript”></script> <script type=”text/javascript”> $(function() { // this will get the full URL at the address bar var url = window.location.href; // passes on every “a” tag $(“.topmenu a”).each(function() { // checks if its the same … Read more

Highlight dates in specific range with jQuery’s datepicker

You can use the beforeShowDay event. It will get called for each date that needs to be shown in the calendar. It passes in a date and return an array with [0]= isSelectable, [1]= cssClass, [2]=Some tooltip text $(‘#whatever’).datepicker({ beforeShowDay: function(date) { if (date == myDate) { return [true, ‘css-class-to-highlight’, ‘tooltipText’]; }else{ //this will allow … Read more

How can I highlight the table row on click ?

If you want to use the stock on click highlight like you get with a generic ListView, you want to set the background of each row to be android:background=”@android:drawable/list_selector_background” Here is an example: <TableLayout android:layout_width=”fill_parent” android:layout_height=”wrap_content” android:stretchColumns=”0″> <TableRow android:id=”@+id/first_row” android:background=”@android:drawable/list_selector_background” > … row content … </TableRow> </TableLayout> Then in code, TableRow firstRow = (TableRow) findViewById(R.id.first_row); … Read more