Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    jawa
    @jawa12787066_twitter
    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 ?
    Tricia Cuninghame
    @tricky_codes_gitlab
    @tricky_codes_gitlab
    Hello - just wondering if anyone can help me. I have a site which uses a pop up to log into instagram and pass the photos back to the main site.
    The login window then closes itself using window.close()
    This works everywhere except on Chrome on android
    Does anyone know how to get it working on mobile?
    also it works in incognito mode on android - but not normal mode...
    dinesh
    @1532j0004kg
    May be ur module or library not supports the version.. check the supported platforms if it is a module! @tricky_codes_gitlab
    Zerka1982
    @Zerka1982
    Hello guys,
    Is there a way I can store the result of my data ( used in the series ) in a variable & use it inside the series to get the same result as I have in this example ? ( Highcharts )
    https://jsfiddle.net/xs9vh16o/
    Shady Alfred
    @shadyalfred
    I don't have a jQuery specific question. I'm using jQuery DataTables. It's great but I can't export header with multiple rows. Is there a solution?
    lampenschakelen
    @lampenschakelen
    Hello
    Is there someone that can help me out with the script below: http://jsfiddle.net/jakecigar/pTQgB/
    1,5 + 1.5 = 3
    image.png
    Shady Alfred
    @shadyalfred
    @lampenschakelen try parseFloat instead of parseInt
    Zerka1982
    @Zerka1982
    try parseFloat instead of parseInt
    gerome0123
    @gerome0123
    how to add whitespace in select option value?
    DoraRajappan
    @DoraRajappan
    /! jQuery v1.8.2 jquery.com | jquery.org/license /
    (function(a,b){function G(a){var b=F[a]={};return p.each(a.split(s),function(a,c){b[c]=!0}),b}function J(a,c,d){if(d===b&&a.nodeType===1){var e="data-"+c.replace(I,"-$1").toLowerCase();d=a.getAttribute(e);if(typeof d=="string"){try{d=d==="true"?!0:d==="false"?!1:d==="null"?null:+d+""===d?+d:H.test(d)?p.parseJSON(d):d}catch(f){}p.data(a,c,d)}else d=b}return d}function K(a){var b;for(b in a){if(b==="data"&&p.isEmptyObject(a[b]))continue;if(b!=="toJSON")return!1}return!0}function ba(){return!1}function bb(){return!0}function bh(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function bi(a,b){do a=a[b];while(a&&a.nodeType!==1);return a}function bj(a,b,c){b=b||0;if(p.isFunction(b))return p.grep(a,function(a,d){var e=!!b.call(a,d,a);return e===c});if(b.nodeType)return p.grep(a,function(a,d){return a===b===c});if(typeof b=="string"){var d=p.grep(a,function(a){return a.nodeType===1});if(be.test(b))return p.filter(b,d,!c);b=p.filter(b,d)}return p.grep(a,function(a,d){return p.inArray(a,b)>=0===c})}function bk(a){var b=bl.split("|"),c=a.createDocumentFragment();if(c.createElement)while(b.length)c.createElement(b.pop());return c}function bC(a,b){return a.getElementsByTagName(b)[0]||a.appendChild(a.ownerDocument.createElement(b))}function bD(a,b){if(b.nodeType!==1||!p.hasData(a))return;var c,d,e,f=p._data(a),g=p._data(b,f),h=f.events;if(h){delete g.handle,g.events={};for(c in h)for(d=0,e=h[c].length;d<e;d++)p.event.add(b,c,h[c][d])}g.data&&(g.data=p.extend({},g.data))}function bE(a,b){var c;if(b.nodeType!==1)return;b.clearAttributes&&b.clearAttributes(),b.mergeAttributes&&b.mergeAttributes(a),c=b.nodeName.toLowerCase(),c==="object"?(b.parentNode&&(b.outerHTML=a.outerHTML),p.support.html5Clone&&a.innerHTML&&!p.trim(b.innerHTML)&&(b.innerHTML=a.innerHTML)):c==="input"&&bv.test(a.type)?(b.defaultChecked=b.checked=a.checked,b.value!==a.value&&(b.value=a.value)):c==="option"?b.selected=a.defaultSelected:c==="input"||c==="textarea"?b.defaultValue=a.defaultValue:c==="script"&&b.text!==a.text&&(b.text=a.text),b.removeAttribute(p.expando)}function bF(a){return typeof a.getElementsByTagName!="undefined"?a.getElementsByTagName(""):typeof a.querySelectorAll!="undefined"?a.querySelectorAll(""):[]}function bG(a){bv.test(a.type)&&(a.defaultChecked=a.checked)}function bY(a,b){if(b in a)return b;var c=b.charAt(0).toUpperCase()+b.slice(1),d=b,e=bW.length;while(e--){b=bW[e]+c;if(b in a)return b}return d}function bZ(a,b){return a=b||a,p.css(a,"display")==="none"||!p.contains(a.ownerDocument,a)}function b$(a,b){var c,d,e=[],f=0,g=a.length;for(;f<g;f++){c=a[f];if(!c.style)continue;e[f]=p._data(c,"olddisplay"),b?(!e[f]&&c.style.display==="none"&&(c.style.display=""),c.style.display===""&&bZ(c)&&(e[f]=p._data(c,"olddisplay",cc(c.nodeName)))):(d=bH(c,"display"),!e[f]&&d!=="none"&&p.data(c,"olddisplay",d))}for(f=0;f<g;f++){c=a[f];if(!c.style)continue;if(!b||c.style.display==="none"||c.style.display==="")c.style.display=b?e[f]||"":"none"}return a}function b(a,b,c){var d=bP.exec(b);return d?Math.max(0,d[1]-(c||0))+(d[2]||"px"):b}function ca(a,b,c,d){var e=c===(d?"border":"content")?4:b==="width"?1:0,f=0;for(;e<4;e+=2)c==="margin"&&(f+=p.css(a,c+bV[e],!0)),d?(c==="content"&&(f-=parseFloat(bH(a,"padding"+bV[e]))||0),c!=="margin"&&(f-=parseFloat(bH(a,"border"+bV[e]+"Width"))||0)):(f+=parseFloat(bH(a,"padding"+bV[e]))||0,c!=="padding"&&(f+=parseFloat(bH(a,"border"+bV[e]+"Width"))||0));return f}function cb(a,b,c){var d=b==="width"?a.offsetWidth:a.offsetHeight,e=!0,f=p.support.boxSizing&&p.css(a,"boxSizing")==="border-box";if(d<=0||d==null){d=bH(a,b);if(d<0||d==null)d=a.style[b];if(bQ.test(d))return d;e=f&&(p.support.boxSizingReliable||d===a.style[b]),d=parseFloat(d)||0}return d+ca(a,b,c||(f?"border":"content"),e)+"px"}function cc(a){if(bS[a])return bS[a];var b=p("<"+a+">").appendTo(e.body),c=b.css("display");b.remove();if(c==="none"||c===""){bI=e.body.appendChild(bI||p.extend(e.createElement("iframe"),{frameBorder:0,width:0,height:0}));if(!bJ||!bI.createElement)bJ=(bI.contentWindow||bI.contentDocument)
    can someone explain is two selects have same variable name if this logic work
    alos explain th elogic of this jquery
    gerome0123
    @gerome0123
    how to get all selected option and make the first character color red
    Tommy Odom
    @tpodom
    Hey, does anyone know if https://nvd.nist.gov/vuln/detail/CVE-2018-18405 is legitimate? I didn't see any issue in github related to it and the linkedin profile mentioned does not seem to exist. The vulnerability is causing our security scans to fail now
    Daniel Ruf
    @DanielRuf
    Looks like a spam entry - no further info from 2018.