Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Vishwa Jay
    @VishwaJay
    @DanielRuf the object can be broken down and parsed, but it might also return a NaN, null, or variety of other things depending on the flavor being used... at least, that was my understanding.
    Daniel Ruf
    @DanielRuf
    @VishwaJay not exactly. jQuery does not return such things for the selector. It is always a selector but the length differs based on the collection.
    Sherlocked556
    @Sherlocked556
    $.ajax({url:"/checkout",timeout:10000,type:"POST",data:{restro:b,custo:a,loc:c,bill:bill,order:arr,slot:e,pay:f,room:g},success:(result)=>{
    console.log(result+" its here");
    },error:(x,y,error)=>{console.log(error)}});
    Hi everyone, above is my code and it's always timing out please help

    app.post("/checkout",isLoggedIn,(req,res)=>{
    for(var i=0;i<req.body.order.length;i++){ if(req.body.order[i].itname=="nullified") req.body.order.splice(i,1); i=0; } var orderpp={ restroname:req.body.restro, cusname:req.body.custo, deliveryadd:req.body.loc, bill:req.body.bill, items:req.body.order, deliveryslot:req.body.slot, payment:req.body.pay, roomdet:req.body.room }; console.log(orderpp.items); Order.create(orderpp,(err,neworder)=>{
    if (err) {
    req.flash("error",err.message);
    res.redirect("/index");
    } else {

       console.log(neworder +"jkdjkd");
    
     }

    })
    })

    This is the serverside code in node where I'm trying to retrieve data
    rushabh2001
    @rushabh2001

    alt

    Hey Developers,
    Do you think you know WordPress? Let's Meetup

    Join us in a discussion over-

    • Why WordPress is popular and powerful?
    • Wordpress Theme Structure
    • Theme and Plugin Installation
    • Building a Blog from scratch

    Having knowledge of web development is recommended.

    Connect with the young and knowledgeable developers on-
    Date: 20th July 2019
    Time: 4 pm Onwards
    Venue: Embtel Solutions
    501, SNS Business Park,
    Vesu, Surat

    https://goo.gl/maps/jYpJR8w6EU6zdsbt7

    For any query contact on - 7990433775
    (You will get a confirmation call)

    What are you waiting for!? Click on the link below to register.

    https://embtelsolutions.in/meet-up/

    Mohsin AR
    @iammohsinar

    hello experts of jquery i have seen so many examples on internet regarding focus on next input/select by left and right arrow key but those are for simple html

    
    $(':input').keypress(function() {
        $(this).next(':input').focus();
    });
    
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
    <input placeholder="1">
    <input placeholder="2">
    <input placeholder="3">
    <input placeholder="4">
    <input placeholder="5">

    i want it like i have

    <form>
    <div>
    <div>
    <input placeholder="1">
    </div>
    </div>
    <div>
    <div>
    <input placeholder="2">
    </div>
    </div>
    </form>
    what will be the code for above or like find input from all html which has css class of "move"
    Sharath CB
    @sharath747

    Hi all,

    I am using formbuilder inside my custom wordpress plugin. While creating the form fields i need to incorporate a conditional form logic to one of my form field (checkbox)

    To explain you the scenario, i have 2 select dropdowns & one "Terms and Condition" checkbox in my form,
    first select dropdown is for selecting the country & another select dropdown is for selecting the states of that country, at the time of form creation the country & state select dorpdowns are left blank,
    based on the id's of these 2 fields i am injecting the countries & states dynamically at the time of page load in the browser.
    here i need to have a conditional logic to my checkbox field, when the country is selected to USA i need to hide the terms & condition checkbox field, for all other countries i need to show the terms & condition checkbox.

    I was able to achieve this by writing an external jquery script which checks for the condition on change of the country select dropdown, but i dont want to hardcode the condition in my script,
    i want to have a conditional logic field to be shown in my checkbox edit configuration, where i can configure for which country name i need to hide the checkbox.
    how can i achieve this in formbuilder, i am using the latest version of form builder (formBuilder v3.2.5)

    here is the my codepen link https://codepen.io/Sharath747/pen/WVwggP

    giuliohome
    @giuliohome
    Hi all, I've opened volosoft/jtable#2223 in the jquery jtabel repo, but - AFAICS - it seems to be due to the jquery .serialize()
    Why are different jquery version returning different serialization results? For one version I see spaces rendered as %20 which is fine to me while from jquery-1.9.1 I see + for encoding spaces, which is an issue for me
    giuliohome
    @giuliohome
    Ok, this has been fixed in the latest jQuery version
    Nikola Stekovic
    @RigaNik
    gotta update one huge app jquery-2.1.1 to latest jquery version, any steps where should i start and what would be the easiest way without having to test everything and worry about breaking stuffs?
    anoopmb
    @anoopmb

    @anoopmb
    hi i am trying include one template in my laravel application but it gives me jquery illegal invocation error but the template html working fine without laravel
    any idea?

    Uncaught TypeError: Illegal invocation
        at w.fn.init.offset (jquery-3.3.1.min.js:2)
        at HTMLAnchorElement.<anonymous> (custom.js:418)
        at HTMLAnchorElement.dispatch (jquery-3.3.1.min.js:2)
        at HTMLAnchorElement.y.handle (jquery-3.3.1.min.js:2)
    offset @ jquery-3.3.1.min.js:2
    (anonymous) @ custom.js:418
    dispatch @ jquery-3.3.1.min.js:2
    y.handle @ jquery-3.3.1.min.js:2

    this is the code above error points

    var target = $(this.hash);
            target = target.length ? target : $('[name=' + this.hash.slice(1) + ']');
            if (target.length) {
                event.preventDefault();
                $('html, body').animate({
                    scrollTop: $(target).offset().top
                }, 1000, function() {
                    var $target = $(target);
                    $target.focus();
                    if ($target.is(":focus")) {
                        return false;
                    } else {
                        $target.attr('tabindex','-1');
                        $target.focus();
                    }
                });
    dinesh
    @1532j0004kg
    hello
    Any one aware of getJson() inside the for loop
    jawa
    @jawa12787066_twitter
    Hi friends, Actually I'm using materialize date picker
    But, i couldn't able to access the date picker when we create a textbox using Jquery
    I have attached my code below

    <script src="https://code.jquery.com/jquery-3.2.1.min.js" integrity="sha256-hwg4gsxgFZhOsEEamdOYGBf13FyQuiTwlAQgxVSNgt4=" crossorigin="anonymous">
    </script>
    <!-- Compiled and minified CSS -->
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0/css/materialize.min.css">

    <!-- Compiled and minified JavaScript -->
    <script src="https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0/js/materialize.min.js"></script>

    <button id="add">add</button>

    <div id="createtextbox">

    </div>
    <!-- <input type="text" class="datepicker"> -->

    <script>
    $(document).ready(function(){
    $('#add').click(function(){
    $("#createtextbox").append('<input type="text" class="datepicker" value="" />');
    });
    document.addEventListener('DOMContentLoaded', function() {
    var elems = document.querySelectorAll('.datepicker');
    var instances = M.Datepicker.init(elems, options);
    });

    });
    </script>


    Could you please anyone help for me?
    dinesh
    @1532j0004kg
    What is the option denotes here!?
    And by way check out the error if possible in console table @jawa12787066_twitter
    What is M!?
    Rickin Rathatha
    @rrathatha_gitlab
    Hi all, can anyone help i need to create a reusable ajax function (jquery).
    Rickin Rathatha
    @rrathatha_gitlab
    i have the following
    but how can i incoporate complete, error, success etc.
    Patrick Brockmann
    @PBrockmann
    Hi jQuery folks,
    I have encountered a strange behaviour when I used a simple code made with jQuery and vtk.js.
    It works nicelly with google-chrome. But not with firefox.
    The problem is that there is no 'resizestop' event and the resize move cannot be stopped.
    The code can be tested from : https://jsfiddle.net/PBrockmann/vwn10ptd/
    Ilias Giannaros
    @iliasgnrs

    Hi guys! I am new to javascript and need some help with an exercise!
    The requirements:
    Write a javascript function that loops from 1 to 50 and creates DOM elements:
    a) DIV per each even number size 10 X 10 pixels black background
    b) List per each multiples of 3 with the the number of elements according to the count
    c) Input element per each multiples of 6 with the value of the count in the input

    I suppose it starts like this..

    var i;
    for (var i= 0; i < 51; i++) {
    console.log(i);
    }

    Then what? Anyone for help? Thanks everyone!!

    Lars Olesen
    @lsolesen
    I am refactoring some old javascript, but want to start in the most clever way right off the bat. I have this code - https://github.com/motionsplan/motionsplan-dk-jekyll/blob/test/assets/js/plcal.js - that puts the submithandler on this form - https://github.com/motionsplan/motionsplan-dk-jekyll/blob/test/_includes/calculate-vo2-max-hr.html - and I have written a module to take care of the calculations - https://github.com/motionsplan/motionsplan-dk-jekyll/blob/test/assets/js/fitness-hr.js - which I tested with this - https://github.com/motionsplan/motionsplan-dk-jekyll/blob/test/test/fitness-hr.js. My question is: what is best practises with adding the submithandler, requiring the module instead of putting the calculations directly into the submithandler and use the module instead?
    alimae6347
    @alimae6347
    /! jQuery v2.1.1 | (c) 2005, 2014 jQuery Foundation, Inc. | jquery.org/license /
    !function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){var c=[],d=c.slice,e=c.concat,f=c.push,g=c.indexOf,h={},i=h.toString,j=h.hasOwnProperty,k={},l=a.document,m="2.1.1",n=function(a,b){return new n.fn.init(a,b)},o=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,p=/^-ms-/,q=/-([\da-z])/gi,r=function(a,b){return b.toUpperCase()};n.fn=n.prototype={jquery:m,constructor:n,selector:"",length:0,toArray:function(){return d.call(this)},get:function(a){return null!=a?0>a?this[a+this.length]:this[a]:d.call(this)},pushStack:function(a){var b=n.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b},each:function(a,b){return n.each(this,a,b)},map:function(a){return this.pushStack(n.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(d.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(0>a?b:0);return this.pushStack(c>=0&&b>c?[this[c]]:[])},end:function(){return this.prevObject||this.constructor(null)},push:f,sort:c.sort,splice:c.splice},n.extend=n.fn.extend=function(){var a,b,c,d,e,f,g=arguments[0]||{},h=1,i=arguments.length,j=!1;for("boolean"==typeof g&&(j=g,g=arguments[h]||{},h++),"object"==typeof g||n.isFunction(g)||(g={}),h===i&&(g=this,h--);i>h;h++)if(null!=(a=arguments[h]))for(b in a)c=g[b],d=a[b],g!==d&&(j&&d&&(n.isPlainObject(d)||(e=n.isArray(d)))?(e?(e=!1,f=c&&n.isArray(c)?c:[]):f=c&&n.isPlainObject(c)?c:{},g[b]=n.extend(j,f,d)):void 0!==d&&(g[b]=d));return g},n.extend({expando:"jQuery"+(m+Math.random()).replace(/\D/g,""),isReady:!0,error:function(a){throw new Error(a)},noop:function(){},isFunction:function(a){return"function"===n.type(a)},isArray:Array.isArray,isWindow:function(a){return null!=a&&a===a.window},isNumeric:function(a){return!n.isArray(a)&&a-parseFloat(a)>=0},isPlainObject:function(a){return"object"!==n.type(a)||a.nodeType||n.isWindow(a)?!1:a.constructor&&!j.call(a.constructor.prototype,"isPrototypeOf")?!1:!0},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},type:function(a){return null==a?a+"":"object"==typeof a||"function"==typeof a?h[i.call(a)]||"object":typeof a},globalEval:function(a){var b,c=eval;a=n.trim(a),a&&(1===a.indexOf("use strict")?(b=l.createElement("script"),b.text=a,l.head.appendChild(b).parentNode.removeChild(b)):c(a))},camelCase:function(a){return a.replace(p,"ms-").replace(q,r)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b,c){var d,e=0,f=a.length,g=s(a);if(c){if(g){for(;f>e;e++)if(d=b.apply(a[e],c),d===!1)break}else for(e in a)if(d=b.apply(a[e],c),d===!1)break}else if(g){for(;f>e;e++)if(d=b.call(a[e],e,a[e]),d===!1)break}else for(e in a)if(d=b.call(a[e],e,a[e]),d===!1)break;return a},trim:function(a){return null==a?"":(a+"").replace(o,"")},makeArray:function(a,b){var c=b||[];return null!=a&&(s(Object(a))?n.merge(c,"string"==typeof a?[a]:a):f.call(c,a)),c},inArray:function(a,b,c){return null==b?-1:g.call(b,a,c)},merge:function(a,b){for(var c=+b.length,d=0,e=a.length;c>d;d++)a[e++]=b[d];return a.length=e,a},grep:function(a,b,c){for(var d,e=[],f=0,g=a.length,h=!c;g>f;f++)d=!b(a[f],f),d!==h&&e.push(a[f]);return e},map:function(a,b,c){var d,f=0,g=a.length,h=s(a),i=[];if(h)for(;g>f;f++)d=b(a[f],f,c),null!=d&&i.push(d);else for(f in a)d=b(a[f],f,c),null!=d&&i.push(d);return e.apply([],i)},guid:1,proxy:function(a,b){var c,e,f;return"string"==typeof b&&(c=a[b],b=a,a=c),n.isFunction(a)?(e=d.call(arguments,2),f=function(){return a.apply(b||this,e.concat(d.call(arguments)))},f.guid=a.guid=a.guid||n.guid++,f):void 0},now:Date.now,support:k}),n.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(a,b){h["[object "+b+"]"]=b.toLowerCase()});function s(a){var b=a.length,c=n.type(a);r
    gerome0123
    @gerome0123
    hi guys example i have url like this localhost:3000/persons/3/edit
    in my js how to get the id: 3?
    liangddkk
    @liangddkk
    hello
    Jacob Francis Powers
    @Announcement
    Window.location.href and use regex or split by ‘/‘
    GoEagles999
    @GoEagles999
    HI
    Could simeone assist?
    priyavenkat95
    @priyavenkat95

    Hi Guys! I am new to jquery. I had a doubt when using jquery. How to show the HTML file, When I swipe right on the page. I tried to change the color , but i dont know how to show the html file. Anyone help me!
    <!doctype html>

    <html lang="en">
    <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>swipeleft demo</title>
    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css">
    <link rel="stylesheet" href="http://code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.css">
    <script src="http://code.jquery.com/jquery-1.11.3.min.js"></script>
    <script src="http://code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.js"></script>
    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap-theme.min.css">
    <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>

    <style>
    html, body { padding: 0; margin: 0; }
    html, .ui-mobile, .ui-mobile body {
    height: 105px;
    }
    .ui-mobile, .ui-mobile .ui-page {
    min-height: 105px;
    }
    #nav {
    font-size: 200%;
    width:17.1875em;
    margin:17px auto 0 auto;
    }
    #nav a {
    color: #777;
    border: 2px solid #777;
    background-color: #ccc;
    padding: 0.2em 0.6em;
    text-decoration: none;
    float: left;
    margin-right: 0.3em;
    }
    #nav a:hover {
    color: #999;
    border-color: #999;
    background: #eee;
    }
    #nav a.selected,
    #nav a.selected:hover {
    color: #0a0;
    border-color: #0a0;
    background: #afa;
    }
    div.box {
    width: 30em;
    height: 3em;
    background-color: #108040;
    }
    div.box.swipeleft {
    background-color: #7ACEF4;
    }
    div.box.swiperight {
    background-color: #108040;
    }
    </style>
    </head>
    <body>

    <h3>Swipe the green rectangle in the left direction to change its color:</h3>
    <div class="box"></div>

    <script>
    $(function(){
    // Bind the swipeleftHandler callback function to the swipe event on div.box
    $( "div.box" ).on( "swipeleft", swipeleftHandler );
    $( "div.box" ).on( "swiperight", swiperightHandler );

    // Callback function references the event target and adds the 'swipeleft' class to it
    function swipeleftHandler( event ){
    $( event.target ).addClass( "swipeleft" );
    }
    function swiperightHandler( event ){
    $( event.target ).addClass( "swiperight" );
    }
    });
    </script>
    </body>
    </html>

    dinesh
    @1532j0004kg
    Use gg
    Use markdownand send the code @priyavenkat95
    无限风灵
    @WuLex
    说中文行不行?
    눈_눈
    (*・´ω`・)っ[ 恭喜发财 ]
    could you use css()
    dinesh
    @1532j0004kg
    @WuLex What it is? Chinese Js?
    Zerka1982
    @Zerka1982
    Hi guys,
    can anybody tell me why the click event is not working in this example https://codepen.io/Zerka1982/pen/NWPXMby ?
    Am I missing anything ?