Displaying a jQueryUI tooltip based on condition - jquery-ui-tooltip

By default (more precisely, it's designed so that) a jQueryUI tooltip appears on mouseover and focusin events. What I need is the same functionality, but not on mouseover, rather upon a certain condition. It's really cool the way tooltip appears with different possible animations. But it'd be wonderful if I could tweak it to pop up whenever I call it. Do you think it's possible with some minor adjustments to the source or would it need lots of coding?

From looking at the jQuery UI API page, you could use the open and close methods to show and hide the tooltip whenever you need to (copy/pasted from jQuery UI Tooltip API documentation):
$( ".selector" ).tooltip( "open" ); will show the tooltip. To hide it again, just use $( ".selector" ).tooltip( "close" );

Related

Google VR Reticle Click on UI Button

So I am having this issue with using Google VR reticle where I cannot click a button. I have an image attached showing the heirarchy and the PlayButton is what I am trying to click. The Canvas has a Graphic Raycaster, the button has an Event Trigger that calls the method to navigate to the next scene. The UpScrollPanel, and DownScrollPanel work just fine. The EventSystem has the Gaze Input Module, as well as Event System, and Touch Input Module.
Any ideas on how to get this working? I have watched a few videos from NurFACEGAMES and while they helped a little, I haven't gotten the click to work yet.
Oh, and I am using Unity 5.3.4f
Sometimes things can get in the way of the button, make sure that no other UI elements overlap it, for example text borders (which are actually larger than they appear). You can also fix this by moving the button up the hierarchy among its siblings, I believe the first child is top.
Also try moving the button up the hierarchy if possible, sometimes UI having certain parents makes them not work
The canvas object should have a graphic raycaster
I found the issue to be unrelated to anything I thought it was. The menu I was using is a prefab I also use in another view that isn't VR. The scrollrect was loading that prefab, instead of the modified one I was using in the VR menu, and therefore the triggers I had added to the button were no being used when the app loaded.

isotope selected element control

I'm having a little trouble controlling the visual display of my filtering tabs and pagination links using Isotope. I want to fix two issues:
1 How do I class one of my filtering tabs so it looks already selected on page load?
2 When I click on a pagination link in the container, the currently selected tab is declassed, meaning it no longer looks selected?
Please see the demo here andym.ca/designs/isotope/tester4.html and you will understand what I mean.
Regarding the first question; before the code of your Isotope logic proper, you could have this anonymous self-executing function to preset certain things
(function(){
var selector = $('.classtobefilteredoutonload');
$container.isotope({ filter: selector });
// other things that shall happen too go here, like assigning the right class to you PMTV tab div
return false;
})();
Or failing that, leverage hash history to preset your site.
Regarding the second question, it looks like you're using this CngClass function to toggle the focus for all your clickable "a" elements, so naturally Archive Videos will lose focus when you click on a pagination "a" element. You can see it well in Google Chrome's developer tools while clicking on your tabs and paginators.
Well, you should toggle a "highlighting class" on your pagination separately, with a different function from the one that toggles your tabs. An anonymous self-executing function executes as soon as it is encountered, so it looks like the rest of your DOM is not ready. Try the same function but with on document ready.
You can do it like this.
You can pre-mark your tab or whatever item on screen like this

How to make Qt widgets do not react on mouse click

I need on my form ordinary widgets (e.g. buttons) do not react on mouse clicks but NOT to be disabled (it change look to grayed one -- not good).
I wonder is there some neat small hack for this?
You could stick in an event filter and filter out the mouse events before passing the remaining events on for processing, but I'm not sure that not giving the user a visual clue that certain elements are effectively disabled is such a good idea.
You could try using style sheets to control how the disabled mode of the buttons in your form get styled. Unfortunately I'm not sure exactly how to do that but you could have a look at the style sheet docs to get you started.

Detecting out-of-view flex controls

In my flex app I have custom tooltips on buttons that hide and show based on user context.
The problem that I dealing with is that when I call my showTips() function I only want to show tooltips on the buttons that visible in the view. So buttons that on a un-selected tab (tabNavigator) should not show the tooltips.
For some reason all tooltips are showing.
Is there a way to detect if a button is not in current view, like on a un-selected tab?
If you gave us some code I could check this out, but would this work?
if(button.parent.visible) { showTip(button);}
Instead of custom coding for each button, make use your tabnavigator's creation policy is set to "auto".
Check this link for more details
http://livedocs.adobe.com/flex/3/html/help.html?content=layoutperformance_05.html

Best option for modal screens in ASP.NET

I'm looking for the best way to implement a modal popup in ASP.NET of another ASP.NET page. I'm coding for Firefox 2.x+ and can use JQuery, but I'm not very familiar with it.
I see a lot of solutions that use "AJAX", but I'm not sure in what context, so I haven't gone down that route.
I'm using the jQuery UI Dialog plugin. Works very well. Documentation for the plugin can be found at http://docs.jquery.com/UI.
I have used both the ajax modal extender as well as the jQuery jqModal, both have worked pretty well. At the end of the day, this decision should come down to what the rest of the code is like, what your comfort is with each, etc.
If I were to pick an option today, I would probably pick the jqModal or simple modal for jQuery. I'm pretty comfortable with these now.
jqModal
SimpleModal
For simple modal displays, I've found BlockUI to be a great solution.
For example, here's a post about using BlockUI as a modal progress indicator, and here's one about using BlockUI to display a modal confirmation dialog.
If you need something more complex, I'd second the jQueryUI Dialog.
i've used AjaxControlToolkit but jQuery option suggested by #tvanfosson seems a lot nicer
You could use radWindow from Telerik, the jQuery UI Dialog plugin like tvanfosson recommended or you could take a look at
http://vision-media.ca/resources/jquery/jquery-popup-plugin-review which review some jQuery plugins for popups.
Having only expericence with radWindow, I can tell you that with radWindow, you might have to use some hacks and quirks to make it work properly, but the result is good if you put enough time into it.
I make my own, using DOM methods. I've found it to be a lot simpler than adapting any of these plugins to our CSS.
A modal is simply an absolutely positioned window with a background.
We make ours using a larger transparent container with floated contents.
I use a function that returns some html with the floated contents. The class used for the modal box should be absolutely positioned with a high z layer.
function create_modal(doc_id,css_class,append_to)
{
if(typeof append_to==='undefined'){append_to='content';}
var container=document.getElementById(append_to);
if(!container){return false;}
var modal_box=document.createElement('div');
container.appendChild(modal_box);
modal_box.id=doc_id;
modal_box.className=css_class;
return modal_box;
}
var modal_window=create_modal('modal_id','a_css_class');
if(!modal_window){return false;}
modal_window.innerHTML=function_or_var_providing_html();
so, it's all nice and simple without some 10 or 15 k plugin!

Resources