Hello and welcome to our community! Is this your first visit?
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2

Thread: Help

  1. #1
    New to the CF scene
    Join Date
    Jun 2012
    Thanked 0 Times in 0 Posts


    Hi all,

    I am new to java and have read some tutorials from w3s. I have a table with hockey jersey numbers listed in the table. What I am looking to accomplish for my visitors when they click on the link with the corresponding number is to have all of the players that have worn that jersey slide open in a table like box below the actual table. For ex. when a visitor clicks on jersey number 1 a box would slide open revealing all of the players to wear jersey number 1. When the click on another number jersey 1 box would close and jersey "x" would open.

    I have some code but Im guessing there is a better way to acheive this. As well as a much more clean way to do this.

    I have attached what I am working with for code so far below as well as a link to a screen shot where I want the info to appear.

    Hopefully I am on the right track but looking for ways to improve it

    Here is the link to screen shot

    and here is code and html

    $(function() {
    	// get a list of the hidden areas
    	// so you can hide them when toggling 
    	// individual views
    	var lists = $('.player-list');
    	// find all of the links inside of the
    	// table you're displaying
    	$('#jerseys a').click(function() {
    		// get the link info
    		var link = $(this)
    			, target = link.attr('href');
    		// hide all of the lists
    		// then show the specific list
    Thanks in advance for guideance and help

  2. #2
    God Emperor Fou-Lu's Avatar
    Join Date
    Sep 2002
    Saskatoon, Saskatchewan
    Thanked 2,662 Times in 2,631 Posts
    Despite the similar sounding names, Java is not the same as Javascript.
    Moving from Java forum to Javascript frameworks forum.

    Also, in the future please select a title that better describes the issue at hand.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts