Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Need to double click on Firefox

I have my code:

+function($) {
'use strict';
var Ripple = function(element) {
    var $this = $(this)
    $(element).on('mousedown', $this.start)
}
Ripple.prototype.start = function(e) {
    var $this = $(this)
    var r = $this.find('.ripple-wave')
    if(r.length == 0) {
        $this.prepend('<div class="ripple-wave"></div>')
        r = $this.find('.ripple-wave')
    }
    if($this.hasClass('btn') || $this.hasClass('single-action')) {
        var posX = $(this).offset().left, posY = $(this).offset().top
        r.css('left', e.pageX - posX)
        r.css('top', e.pageY - posY)
    }
    r = r.parent()
    r.addClass('active')
    r.one('webkitAnimationEnd oanimationend msAnimationEnd animationend', function(e) {
        r.removeClass('active')
    })

}

var old = $.fn.ripple

$.fn.ripple = function() {
    return this.each(function() {
        new Ripple(this)
    })
}

$.fn.ripple.Constructor = Ripple

$.fn.ripple.noConflict = function () {
    $.fn.ripple = old
    return this
}}(jQuery);

But if i test on Mozilla Firefox, i have to double click the element in order to do its function.

I initialize this to my on page load using:

$('.ripple').ripple()

PS: I also have on click event on each element from other JS file.

In chrome, it's working properly, in a single click.

like image 379
Raffy Cortez Avatar asked Oct 27 '15 07:10

Raffy Cortez


People also ask

Why does Firefox open two windows when I click a link?

Can you check your Firefox preferences, on the first (General) page? At least temporarily, un-check Restore Previous Session in the Startup section at the top, if it is not already. Under the Tabs section, check the box for Open Links in Tabs Instead of New windows.

How do I use click tools in Firefox?

Answer : Press the Alt key on your keyboard and look at the upper left of your screen. In adddition to the above : The header of your question reads : "'' how to access tools '' " Answer : Press the Alt key on your keyboard and look at the upper left of your screen.

How do I view two windows side by side in Firefox?

Go to the tab you want to open, mark it with the star on your link bar. Press CTRL + B, find your link, right click, propreties > Load this tab on a splitted screen (or something like this, don't have it in english), and click on it. You're done.

How do I see Firefox elements?

Right click on an element of the page. Right click highlighted element.


1 Answers

  1. $( "p" ).dblclick(function() { alert( "Hello World!" ); });

  2. <p ondblclick="myFunction()">Double-click me</p>

like image 73
Айдън Бейтулов Avatar answered Oct 19 '22 15:10

Айдън Бейтулов