How to create a tooltip similar to Discord using TippyJS? - tippyjs

I want to design a tooltip for my HTML page, and the tooltip in the Discord application is the one that suits my eye the most. When I put the two together, they have almost the same similarity, maybe they are.
Actually, my goal was to get the opening and closing animation when it came to it, like Discord, I searched a lot, but I couldn't find a link to it, so I didn't get a good tooltip from this either.
I know that Discord uses inertia: true, but I don't know how I can get the on and off animation. How can I achieve this?

Related

Programatically disable Lazy Loading or infinite scroll with jQuery in Pinterest?

NOTE: New to this forum (UX/User Experience), so please let me know if this would be better in a different category. I searched Stack Exchange for "pinterest" and this forum seemed to have the most results. Thanks!
Hi guys. I'm writing a jQuery gist to grab links of all the images pinned to a given board in Pinterest. However, I've been running into the problem of having to repeatedly keep scrolling because all the results are not displayed on the same page. With the trendy "infinite scroll" or "lazy load" feature, one has to keep scrolling to the bottom without actually knowing if they are anywhere close because it seems to depend on your zoom percentage in your browser window and your window size as well, as to how many items display on your screen. I've been searching this for hours to no avail.
Searches I've already done keep returning non-productive results
The results I get when searching for
"Pinterest how to disable lazy loading" and "Pinterest how to disable infinite scroll"
keep returning the opposite of what I am looking for -- incorrect results for my purposes are anything like:
"How to add infinite scroll to my website",
"20 Useful Pinterest Tools",
or anything to do with adding infinite scroll.
The Problem: Infinite Scroll/Lazy Loading makes it hard for me to use browser plugins like jquerify (Chrome) and FireQuery (Firefox)
The issue for me is that I want to be able to view all my pins on a given board at once. Then I can use jQuery to manipulate all images on the page. Currently, infinite scroll makes it hard to keep track of where I'm at. I've tried stuff already by it's late at night and hard to remember everything. The important find was that in page source, Pinterest is using a "lazy" function. Here is what I found:
P.lazy = {
onImageLoad: function(a) {
var b = LOADED_CLASS;
P.overlap.isOverlappingViewport(a) && (b += FADE_CLASS);
a.className += b
}
};
This is just starting to be a deeper rabbit hole. I've checked for plugins to "remove", "disable", or "bypass" lazy loading, but haven't found any ... only those for adding it in.
Thanks in advance for your kind assistance and Cheers.
Pinterest loads cards via Ajax. When you scroll to the bottom of a page, browser javascript fires an Ajax call to load the next page full of cards.
This means it's not really possible to "disable" the infinite scrolling feature.
A few possible approaches:
Depending on how you're instantiating the browser, you might try setting or spoofing the window dimensions to a very large height. Pinterest may detect that height and attempt to load a window's worth of images, which may be enough to cover the feed you're trying to scrape.
If #1 is not practical for you, you can use javascript/jquery to keep scrolling the browser down until it has finished loading all the images. There are several ways to do this, since you are injecting javascript into the browser session.
(a) You can do this the "dumb" way with a loop that sets a timeout (setTimeout), then scrolls to the bottom (scrollTo()), then keeps going until the window stops scrolling and that comprises a kludgey auto-detect for the bottom of the page load.
(b) a more sophisticated approach would be to implement a listener for pinterest's ajax load function, (see the code, but it's a GET request to URL https://www.pinterest.com/resource/UserHomefeedResource/get/). An ajaxComplete() jQuery handler may help you detect the completion of a page load request so you can scrape the new images loaded.
Hope that helps

Button being used as a link

Im maintaining a site I didnt build thats for car insurance. In the banner of every page is an input that takes you to a page with a form to fill out. I cant understand why an input is used instead of a link, is there ever a valid and semantic reason for doing this?
Occasionally, people have done this because they want a link that "looks like a button". However, it is bad design.
It was never a good idea, but in the old days there was at least some justification for it: it gave a button feel and functionality to the link. However, with modern web design there is no need to do this: the same functionality can be created simply by styling a normal link appropriately.
On the other hand, this is probably more of a style issue than a real problem. It may not be worth changing it if you are maintaining an existing site.
using button or input type="button" is the original way to set up an Ajax request. that said, since it's taking the user to another page, sounds like they do not know what they are doing and/or wanted the styles that #dan1111 mentioned

Titanium HTML Scrape

I could not be any more brand-spanking new to Titanium, so even finding the right search terms is a chore, but I need to prototype a means of loading external content into a mobile app. Lots of random poking around has yielded the url configuration property of the createWebView() method, but there's a twist (didn't you know there would be?). Now I need to extract only a particular DOM node (the div with an id value of content) and display only that content.
As best I can tell, it looks like the Kitchen Sink app's "XHR to Filesystem" demo looks like the right way to go, but I don't want to spin my wheels. Can anyone confirm whether I'm on the right track?
As a side question that I (admittedly) haven't researched much yet is whether I can load jQuery into my Titanium app and use it to extract the #content DOM from everything else.
I'd appreciate any thoughts.
you are on the right track with using the httpClient, you can also load up jQuery, but i think that it might be overkill if you are just trying to pull some content from XML
http://wiki.appcelerator.org/display/guides/Working+with+Remote+Data

Where can I read how to make web notifiers such as the StackExchange at the top left side of StackOverflow screen?

I'm not even sure what the name of that is to be able to make a search... but I would like to make those kind of things. Facebook has that too with the messages, notifications and friends requests. Thanks
I'm not sure if you expect anyone to give you a complete tutorial with source code included? :) You should probably do some digging around yourself, since a concrete answer on this could mean to write a few pages :)
How can you dig around?
Thé tool for a job like that is Firebug (IMO).
With bigger tasks like these it makes sense to try to split it up in smaller pieces.
Let's say you go for a widget like the user profile popup on SO.
you need some HTML to display in a popup: right click on any html element on the popup and click the 'inspect element' menu item. This brings you to the HTML tab in firebug. This allows you to figure out how the HTML is structured
you need some CSS to style that popup: when you're browsing the html structure, you might already have noticed that on the right side of it is the CSS that is applied to the active element
you might want to use some animation effects: for that you could use jquery. Have a look here to find out more on which effects are available and how they can be triggered. Fading is used in the profile popup on SO.
then you might ask yourself the question where SO get's that html structure from, right? To find out more about which server calls are made you can use the 'NET' tab in Firebug. (When you hover over your user name (only the first time?), then you should notice there's a call made to something like: http://stackoverflow.com/users/profile-link-stats?_=someLongNumberHere
In firebug you can then inspect the request and response. You should notice that the response is some HTML structure. This HTML structure is then inserted into the DOM.
Sooooo you can kinda glue it all together now:
the user hovers over his user name
the hovering triggers a server call (see step 4): use jquery hover to attach a handler to the user link. (subsequent hovers don't trigger that server call, so there needs to be a check to see if that profile popup was already loaded or not)
when the server call successfully returns (see jquery get), the returned html is inserted into the DOM and a fadeIn effect is triggered.
it seems a mouseout is used to fadeOut the popup
I HOPE this is the answer you were looking for. It took me a while ;)
You probably need to check out stackapps

Google Maps API not letting go of the mouse click

I'm using the Google maps API to place a map onto a web page, just like millions of other sites have done.
However, once I click on the map (and let go), the map then acts if the mouse button is still being held and drags the map all over the page. The only way to get free of this drag action is to hit F5 and reload the page.
I've spent several hours scouring Google to find a remedy to this but can't find any mention of this issue from anyone else.
The problem can be seen at the bottom of the following page:
http://www.ef-deutschland.de/master/lt2010/default.aspx
Does anyone have any idea why this is occurring?
I vagely remember encoutering something similar a while back, I think it was caused by having an overlay somewhere on the map that wasn't supposed to be there.
Also try simplifying the code, put the map on its own page (without all the other jQuery stuff going on), and remove all parts of your code one by one until you can isolate the problem...