How do I make qTip2 for jQuery work only on click?
Date : March 29 2020, 07:55 AM
it fixes the issue Your first method is just adding a qTip to the when the .clickme button is clicked, although I do not understand why it seems to not be added and then sometimes appears on mouseover. The second method is using the show syntax from qTip 1.0 but you have included qtip 2 as the library in the fiddle. The qTip 2 show API is very different. $('.clickme').qtip({
content: 'Hello 2nd Test',
show: 'click'
});
|
Make these click functions work without jQuery
Tag : html , By : Steve M
Date : March 29 2020, 07:55 AM
wish help you to fix your issue I would propose a solution without jquery. You should add some classes to css and apply them to appropriate UL-tags in your html-code. here is a jsfiddle sample working on pure javascript (no jquery) Here the javascript source code is: function getXmlHttp(){
try {
return new ActiveXObject("Msxml2.XMLHTTP");
} catch (e) {
try {
return new ActiveXObject("Microsoft.XMLHTTP");
} catch (ee) {
}
}
if (typeof XMLHttpRequest!='undefined') {
return new XMLHttpRequest();
}
}
function hide(node){
node.style.display='none';
}
function func(e){
e.preventDefault();
var q = getXmlHttp();
var url = this.getAttribute('href');
q.open('GET', url , false);
q.send(null);
var result = 'File '+url+' not found.';
if(q.status == 200) {
result = q.responseText;
}
document.querySelector('.page').innerHTML = result;
document.querySelector('#leftmenu').style.width = '70px';
var items = document.querySelectorAll('li ul, #leftmenu b');
for (var i=0; i<items.length; i++) {
hide(items[i]);
}
this.removeEventListener('click',func(),false);
}
function slideUp(node){
node.setAttribute('class', "submenu hidden");
}
function slideDown(node){
node.setAttribute('class', "submenu visible");
}
function switchSubMenu(){
var ch = this.children;
for(var i=0; i<ch.length; i++) {
if (ch[i].nodeName == 'UL') {
var v = document.getElementsByClassName("visible");
if (v) {
for(var j=0; j<v.length; j++){
if(v[j] != ch[i]) {
slideUp(v[j]);
}
}
}
ch[i].getAttribute('class') == "submenu hidden" ? slideDown(ch[i]) : slideUp(ch[i]);
}
}
}
var sm = document.querySelectorAll('.submenu');
for(var i=0; i<sm.length; i++) {
slideUp(sm[i]);
sm[i].parentNode.addEventListener("click",switchSubMenu, false);
}
var links = document.querySelectorAll('.reveal');
for(var j=0; j<links.length; j++) {
links[j].addEventListener("click",func, false);
}
|
jQuery click event on insertBefore method
Date : March 29 2020, 07:55 AM
wish helps you It's a trigger. When you use $("selector").Click() without any parameter, all of the selector that selected with $("selector"), will be clicked and click event of them will be fired. May be you can find an event handler like this in that code too: $('.ex-class').on('click', function(){....})
|
try to get var from each function jquery and work with insertbefore
Date : March 29 2020, 07:55 AM
I wish did fix the issue. I am trying to get div id number and insert it before, here is my code: , Try this: jQuery("#container div.mix:eq(2)").insertBefore( jQuery("#container div.mix:eq(3)") );
|
PHP DOMDocument: insertBefore, how to make it work?
Tag : php , By : user147496
Date : March 29 2020, 07:55 AM
|