• Home
  • Categories
  • Recent
  • Popular
  • Tags
  • Users
  • Groups
  • Documentation
    • Home
    • Read API
    • Write API
    • Plugin Development
Skins
  • Light
  • Default
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Quartz
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Slate
  • Solar
  • Superhero
  • Vapor
Collapse

Community

N

Nick Evers

@Nick Evers
About
Posts
4
Topics
2
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

    RE: Nodebb Widget and Define()
  • N Nick Evers

    Thank you!

    I am a super noob to require JS and I had a feeling it was something related to calling a require but just am still trying to get used to the frameworks in play 😛


  • Nodebb Widget and Define()
  • N Nick Evers

    Hey,

    Is there a way to reach define scoped javascript when using a widget? I am just trying to wrap the javascript code into a js file for my widget instead of having it in the template in script tags.

    I am trying to do something like below and i'm realatively new to JS and I have gotten this working perfectly when I am going to a route that I've added just can't get it to work when I am rendering widgets...

    define('forum/widgets/recruitment', [''], function () {
    'use strict';

    var recruitment = {};
    recruitment.init = function(){
    console.log('WOOT');
    };

    return recruitment;
    });


  • RE: JQuery in Widget Template
  • N Nick Evers

    You can close this thread..

    Resolved by using app.loadJQueryUI()


  • JQuery in Widget Template
  • N Nick Evers

    Hey,

    I am curious if there is a way to include jquery in my widgets template.. Right now I am using require(['https://code.jquery.com/jquery-3.1.0.min.js','https://code.jquery.com/ui/1.12.0/jquery-ui.min.js'], function(){}). I have no idea if this is the correct approach to including CDN hosted javascript in my widget. This seems to cause problems with jquery timeago throwing errors like "$(...).timeago is not a function" and "widgetAreas.find(...).timeago is not a function". Any tips would be greatly appreciated!

    Use Case - Wanting to use JQuery datepicker in my widget for some reason it wasn't working

    NodeBB Version - "1.1.2"'

    Thanks,
    Nick

  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Home
  • Categories
  • Recent
  • Popular
  • Tags
  • Users
  • Groups
  • Documentation
    • Home
    • Read API
    • Write API
    • Plugin Development
  • Login

  • Don't have an account? Register

  • Login or register to search.