B i t s O f S h a r e P o i n t C o n s u l t i n g L L C > B l o g P o i n t > Posts > JQuery - Solutions - Highlight list Item
JQuery - Solutions - Highlight list Item

OK, I have been seeing a lot more posts on using JQuery and javascript to do some really cool stuff in SharePoint. 

I have found great tricks at www.endusersharepoint.com. Here is link that list all of the great posts they have done on this.  http://www.endusersharepoint.com/?cat=457

I have also found some great tricks at http://pathtosharepoint.wordpress.com

My latest find is from http://weblogs.asp.net/jan/.  Here he posted a solution for highlighting a row in a list as you mouse over it.  I have made only a change to how you reference the JQuery files.  Post: http://weblogs.asp.net/jan/archive/2008/11/24/sharepoint-2007-and-jquery-2.aspx

Here is a sample using it on my site:  http://www.bitsofsharepoint.com/ExamplePoint/Folderless/Forms/AllItems.aspx

Here is the code:

<style type="text/css">
   .myRowHighlight {color:red; background-color:Gainsboro}
</style>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.2.6/jquery.min.js" type="text/javascript"></script>
<script type="text/javascript" src="http://weblogs.asp.net/_layouts/SmartTools.TableRowHighlight/tablerowhighlight.js"></script>
<script>
$(document).ready(function()
    {
        $("table[class='ms-listviewtable'] tr").hover
        (
            function() {
                $(this).addClass("myRowHighlight");
            },
            function() {
                $(this).removeClass("myRowHighlight");
            }
        );
    }
);
</script>

Upated 2/6/09:  I have a newer post that covers more on this: http://www.bitsofsharepoint.com/BlogPoint/Lists/Posts/Post.aspx?ID=26

Comments

There are no comments yet for this post.
Items on this list require content approval. Your submission will not appear in public views until approved by someone with proper rights. More information on content approval.

Title


Body *


Addition: 2 + 1 = *


Please complete this equation.

Email


This is optional.
Attachments

 T o p i c P o i n t

 E x a m p l e P o i n t