Tom Powers
asked on
too Cool to wait a week or weeks. xml array
I want to do something and I was hoping someone could jump in an accelerate this.
I want to load 5 starting players for each team there is a attribute Started="1"
I want to load their headshot and displays there points scored Points attribute. And finally a Tooltip that when you hover over the player it displays Firstname Lastname and Position. I suck at tooltips. I realize this would take me a week or two but I've learned some important tips. Like var sHomeOrAway = vh == 'H' ? 'home' : 'away I named away and home players awayplayer1 to awayplayer5 and homeplayer1 to homeplayer5 So sHomeOrAway + "player" + 1 this is the array part the 1 below is where you find player headshots and team logos and Tooltip text.
That can be tooltip part. The problem is I'll write and my mind thinks of if else if and it will be a bloated chunk of code when I'm starting off Lean what I have so far. I'm trying to learn at writing efficient and lean code. This part is perfect. In the code is the headshots for players. So if you need a good reference handle this and you got it.
Starters.html
18672.XML
I want to load 5 starting players for each team there is a attribute Started="1"
I want to load their headshot and displays there points scored Points attribute. And finally a Tooltip that when you hover over the player it displays Firstname Lastname and Position. I suck at tooltips. I realize this would take me a week or two but I've learned some important tips. Like var sHomeOrAway = vh == 'H' ? 'home' : 'away I named away and home players awayplayer1 to awayplayer5 and homeplayer1 to homeplayer5 So sHomeOrAway + "player" + 1 this is the array part the 1 below is where you find player headshots and team logos and Tooltip text.
var pid = player.attr('ID');
$('#imgcenter').attr('src', 'http://dev.sportsnetwork.com/aspdata/nhl2/NBA/Images/NBAlOGOSZ/'+ tid +".png");
var txt;
$('#imgplayer').attr("src","http://images.sportsnetwork.com/bask/nba/atthecourt/players/" + pid + ".jpg");
txt = " " +
player.attr("FirstName") + " " +
player.attr("Lastname") + ", " +
player.attr("Pos");
That can be tooltip part. The problem is I'll write and my mind thinks of if else if and it will be a bloated chunk of code when I'm starting off Lean what I have so far. I'm trying to learn at writing efficient and lean code. This part is perfect. In the code is the headshots for players. So if you need a good reference handle this and you got it.
Starters.html
18672.XML
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Chris,
Thanks for the work you did with tooltip. I started using your code in a few different things I wanted to create a table that highlights a row then if clicked a nice dialog popup I was wondering if there is a prebuilt JueryUI Dialog popup where I can have player's entire stats based on player id. I learned alot from you and I like your style of writing code. I would love if you do this one. Then I let your chill for the weekend. I'm not relining on you more like learning from you. https://www.experts-exchange.com/questions/28295557/Xml-data-fills-a-table-that-has-ability-with-Dialog-popup.html hope you have a great weekend Thanks Tom
Thanks for the work you did with tooltip. I started using your code in a few different things I wanted to create a table that highlights a row then if clicked a nice dialog popup I was wondering if there is a prebuilt JueryUI Dialog popup where I can have player's entire stats based on player id. I learned alot from you and I like your style of writing code. I would love if you do this one. Then I let your chill for the weekend. I'm not relining on you more like learning from you. https://www.experts-exchange.com/questions/28295557/Xml-data-fills-a-table-that-has-ability-with-Dialog-popup.html hope you have a great weekend Thanks Tom
ASKER