Welcome Guest ( Log In | Register )

Outline · [ Standard ] · Linear+

 [WTA] About programming logic / best practise, put inline or append to body?

views
     
TSKucci
post May 21 2016, 06:59 PM, updated 8y ago

Getting Started
**
Junior Member
221 posts

Joined: Jan 2010
Firstly, I ain't code ninja nor guru. ;\ still practicing MEAN.

About hovercard and tooltips on html.
As many websites use these method to show more option/information when hovering or clicked.
A few example like
1. Facebook, mouseover profile picture will show a hovercard about the profile detail.
2. Dotabuff, mouseover item/hero image will show the detail.
3. tosbase, tree of savior info site.

So I did googled and study some tutorial/stackoverflow solution how to do it.
I had tried both bootstrapJS and jquery tooltipster with ajax call, it works.

My question are should I append the returned html code to element children or append to html body?

» Click to show Spoiler - click again to hide... «


This post has been edited by Kucci: May 21 2016, 06:59 PM
chriss2010
post May 21 2016, 07:30 PM

Getting Started
**
Junior Member
71 posts

Joined: Sep 2009
QUOTE(Kucci @ May 21 2016, 06:59 PM)


the less js the better.

u can check out the basic hovercard something like this

basically it'll just control how the css being rendered

u can compare performance using google's PageSpeed Insights, just submit the localhost or external URL.

 

Change to:
| Lo-Fi Version
0.0101sec    0.52    5 queries    GZIP Disabled
Time is now: 29th March 2024 - 07:04 PM