How to customize qTip2 css?
Tags: jquery,html,css,qtip2
Problem :
I am using qTip2 on my website but have some problems with the css.
I have included the following files :
jquery.qtip.min.js jquery.qtip.min.css
In the js file I have added the following :
$.each($(".tooltip"), function (i, val) {
var theContent = $(val).html();
$(val).qtip({
content: {
text: theContent
},
position: {
my: "bottom left",
at: "top right",
viewport: $(window)
},
show: {
event: false,
ready: true
},
hide: {
effect: function () { $(this).slideUp(5, function () { $(this).dequeue(); }); }
},
style: {
classes: "ui-tooltip-shadow ui-tooltip-jtools"
}
});
});
So far, so good, the problem with this is that it will load the jtools theme, I need to costomize this so I extract the jtools styles from jquery.qtip.css and place it in my own css file like this :
.ui-tooltip-shadow {
box-shadow: 1px 1px 3px 1px rgba(0, 0, 0, 0.15);
}
.ui-tooltip-shadow .ui-tooltip-titlebar, .ui-tooltip-shadow .ui-tooltip-content {
}
/* jQuery TOOLS Tooltip style */
.ui-tooltip-MySite{
background: #232323;
background: rgba(0, 0, 0, 0.7);
background-image: -moz-linear-gradient(top, #717171, #232323);
background-image: -webkit-gradient(linear, left top, left bottom, from(#717171), to(#232323));
border: 2px solid #ddd;
border: 2px solid rgba(241,241,241,1);
-moz-border-radius: 2px;
-webkit-border-radius: 2px;
border-radius: 2px;
-webkit-box-shadow: 0 0 12px #333;
-moz-box-shadow: 0 0 12px #333;
box-shadow: 0 0 12px #333;
}
/* IE Specific */
.ui-tooltip-MySite.ui-tooltip-titlebar{
filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#717171,endColorstr=#4A4A4A);
-ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr=#717171,endColorstr=#4A4A4A)";
}
.ui-tooltip-MySite.ui-tooltip-content{
filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#4A4A4A,endColorstr=#232323);
-ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr=#4A4A4A,endColorstr=#232323)";
}
.ui-tooltip-MySite.ui-tooltip-titlebar,
.ui-tooltip-MySite.ui-tooltip-content{
background: transparent;
color: white;
border: 0 dashed transparent;
}
.ui-tooltip-MySite.ui-tooltip-icon{
border-color: #555;
}
.ui-tooltip-MySite.ui-tooltip-titlebar .ui-state-hover{
border-color: #333;
}
In the declaration of the tooltip I change :
classes: "ui-tooltip-shadow ui-tooltip-jtools"
to
classes: "ui-tooltip-shadow ui-tooltip-MySite"
The problem is that the content do still get the yellow default color? why?
Solution :
The problem in my implemenation was that the $.each($(".tooltip"), function (i, val) had to be within $(document).ready(function ().
CSS Howto..
:not(:nth-child(4n)) will get you anything that isn't :nth-child(4n), i.e. anything that isn't the 4th, 8th and so on. It won't exclude the 2nd child because 2 isn't a multiple of...
Try adding this function. $('.dropdown ul ul li a').click(function(event) { $(".dropdown ul").css({ "visibility":"hidden" }); event.stopPropagation(); }); It will close it on clicking the third layer and the event.stopPropagation() will disable...
OK if you want to use javascript: You need to know the scale you want to use. var originalWidth = document.getElementById('container').offsetWidth; var originalHeight = document.getElementById('container').offsetHeight; var scale1 = 1080/1920; //if...
Set white-space: normal; on your .inner-container to make text wrap inside it
please add a required class to all field that are required. and try this code <div class="row"> <form class="myForm requiredForm"> <input type="radio" class="required" id="lb1" name="radio" /> <input type="radio" class="required" class="required"...
You could try something like this: .header { padding-top:26px; padding-left:40px; position:relative; } .i { position:absolute; width:80px; height:80px; border-radius:50%; top:0; left:0; } .headingText { color:white; background:black; display:inline-block; width:350px; padding-top:10px; padding-bottom:10px; text-align:center;...
Take a look at the jQuery masonry plugin. It does exactly what you're looking for.
To write inline styling use: <div style="height: 100px;"> asdfashdjkfhaskjdf </div> Inline styling serves a purpose however, it is not recommended in most situations. The more "proper" solution, would be to...
There is no such thing as font-color. The name of the property is color. You have an extra < before <style. You shouldn't put your DTD in a comment;...
It was easy! I created class .htmlfixed{ overflow: hidden; height: 100%; } And appointed it to html tag in js....
for one you should be floating the parent of .flexslider to the right instead of the left. <div class="col-lg-offset-1 col-md-offset-1 col-sm-offset-1 col-lg-8 col-md-7 col-sm-7 pull-left"> You have a class called...
Using border-radius and box-shadow. #wrapper { border: solid 1px #eee; border-radius:10px; /* round corners */ box-shadow:0px 3px 5px 5px #000; /* add shadow */ } Here are the parameters for...
Looking through the source code for the first link, it appears to be using one main JQuery plugin to handle the scroll event - Parallax. http://stephband.info/jparallax/. This allows the developer...
Something like this should work: <body style="background-image: url(images/noise-bg.png)"> In terms of specificity, the style attribute should be more specific than styles defined in a stylesheet. You can read more about...
Using the following code: #TextureView { height: 450px; overflow: auto; } You'll have a scroll once the images exceed the height of the container, otherwise - the scroller won't appear....
Try this css- section.slice.bg-6{ overflow:hidden; } ...
Judging from what you have copied onto here, your media queries seem to be incorrect, here are some example queires, as answered on this question... /* Smartphones (portrait and landscape)...
CSS only method: JSFiddle HTML: <li><a href="#"></a></li> CSS: li a:before { content:"(855) TRY PETS" } li a:hover:before { content:"(855) 879 7387" } ...
Sure: .OwnerJoe:before { content: "Joe's Task:"; font-weight: bold; } ...
It depends on the html -- a simple solutions is within(all('.tile.tile-animated.animation-left.animation-visible.animated')[1]) do # some code in here end which will scope to the second matching element on the page, but...
The following works for me. $("#myElement").css({ background: "-webkit-gradient(linear, left top, left bottom, from(#000000), to(#FFFFFF))"}).css({ background: "-moz-linear-gradient(top, black, white)" }); jsFiddle Demo Changes: background instead of backgroundImage top, bottom to: left...
here you go @media (min-width:320px) { /* smartphones, iPhone, portrait 480x320 phones */ } @media (min-width:481px) { /* portrait e-readers (Nook/Kindle), smaller tablets @ 600 or @ 640 wide. */...
index.js: require.context('./blocks', true, /\.js$/); require.context('./blocks', true, /\.scss$/); ...
Well you need to set z-index in header and footer div like this .header { width: 100%; background-color: #4F7776; text-align: center; font-weight: bold; top: 0; position: fixed; z-index:9; } .footer...
You are on the right path as you said with .placeholder-red::-webkit-input-placeholder{...} it worked well. To apply to the rest of your CSS support, just do this: input.placeholder-red::-moz-placeholder { color: red;...
If this the full code you are not making submit_hit to true, i think its need to set true before form.submit() so the js for div1/div2 execute. $("#loader1").show(); submit_hit =...
JS fiddle DEMO modified your markup a little <div class="carousel colorDissolve"> <div class="item"> <img src="https://encrypted-tbn2.gstatic.com/images?q=tbn:ANd9GcTGNBB_xiix1HdkfCW1OG8NmMqbU23KUIXKE1HuK3RW3UBV_smc" /> <span>Picture Car from Google.com</span> </div> <div...
Try this: .box { width:70%; height:200px; background:#d6d6d6; margin:40px auto; position: relative; } .box:before, .box:after { z-index: -1; position: absolute; content: ""; bottom: 15px; left: 10px; width: 50%; top: 80%; background:...
Just use the adjacent sibling selector + #element-a:empty + #element-b {font-weight:bold;} The + selector will select the element that is placed right after the selected element. Update after question was...
You have a problem with your if statements. Instead of if($urlrequest == "/PS/" || "/PS/#pics") You need if($urlrequest == "/PS/" || $urlrequest == "/PS/#pics") The reason is because the operators...