• HOME
    • PRODUCT
    • PRICING
    • ABOUT
    • COMMUNITY
    Menu
    • HOME
    • PRODUCT
    • PRICING
    • ABOUT
    • COMMUNITY
    Get in touch
    Get in touch
    Menu
    • HOME
    • PRODUCT
    • PRICING
    • ABOUT
    • COMMUNITY
    • Sign in
    • Start free trial
    • Get in touch
    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Popular
    • Tags
    • Users
    • Groups
    • Documentation
      • Home
      • Read API
      • Write API
      • Plugin Development
    1. Home
    2. Amir Rasyid
    • Profile
    • Following 0
    • Followers 0
    • Topics 1
    • Posts 1
    • Best 0
    • Controversial 0
    • Groups 0

    Amir Rasyid

    @Amir Rasyid

    0
    Reputation
    260
    Profile views
    1
    Posts
    0
    Followers
    0
    Following
    Joined Last Online

    Amir Rasyid Unfollow Follow

    Latest posts made by Amir Rasyid

    • jQuery loading twice after adding script to theme

      Greetings, I am trying to directly modify some files in the persona theme to include the slick carousel slider as a header. I've added it as an inline script in header.tpl and also changed my requirejs-config accordingly:

      require.config({
      	baseUrl: "{relative_path}/src/modules",
      	waitSeconds: 3,
      	urlArgs: "{config.cache-buster}",
      	paths: {
      		'jquery': '../../vendor/jquery/js/jquery',
      		'forum': '../client',
      		'admin': '../admin',
      		'vendor': '../../vendor',
      		'mousetrap': '../../bower/mousetrap/mousetrap',
      		'slick': 'http://cdn.jsdelivr.net/jquery.slick/1.5.9/slick.min'
      	},
          shim: {
          'slick' : ['jquery']
      }	
      });
      

      I find that the slider and site is working fine only on a fresh page load/reload. On a click of any button to navigate, the slider breaks and i get these errors:

      Uncaught TypeError: $(...).timeago is not a function
      Uncaught TypeError: $(...).tooltip is not a function
      Uncaught TypeError: widgetAreas.find(...).timeago is not a function

      Probably suggesting that jQuery was loaded more than once. I'm inclined to think that this has got something to do with how I've changed the requirejs above. However leaving out the above change will lead to:

      Uncaught TypeError: Cannot read property 'fn' of undefined in slick.min.js

      Possibly suggesting the jQuery wasn't loaded?

      I've also looked and followed the tips here but nothing seems to work. I just feel that I'm really close to getting it done.

      posted in NodeBB Development
      Amir Rasyid
      Amir Rasyid

    Get Started

    • Product
    • Pricing

    Resources

    • Demo Site
    • Answers
    • Docs
    • Bug Bounty

    Company

    • About
    • Blog
    • Contact
    Start Free Trial
    Github Facebook Instagram Twitter
    © 2014 – 2022 NodeBB, Inc. — Made in Canada.
    • Terms
    • Privacy
    • GDPR
    • DMCA
    • Contact
    Menu
    • Terms
    • Privacy
    • GDPR
    • DMCA
    • Contact