Coder Social home page Coder Social logo

Comments (4)

tkahn avatar tkahn commented on September 6, 2024

Hi!

I love the work you are putting in to contribute!
It sounds like a good idea to have a method with which you can add "raw HTML" right into the scroller without using AJAX. I'll also look into the possibilities to access raw data from the plugin with new public methods.

/Thomas

from smooth-div-scroll.

tkahn avatar tkahn commented on September 6, 2024

I'm looking over the code right now and I think the function for adding or replacing content (changeContent) will become bloated and complicated to understand and use if I just keep adding new functionality to it, especially since I want to add a filtering option to the AJAX content loader. Therefore I'm now working on a solution where I split it into three different methods, each with a specific purpose:


getFlickrContent
Arguments are:
flickrFeedURL - a valid URL to a Flickr feed - string
manipulationMethod - add or replace (default) - string
addWhere - first or last (default) - string


getAjaxContent
Arguments are:
ajaxContentURL - a valid URL to an AJAX content source - string
manipulationMethod - add or replace (default) - string
addWhere - first or last (default) - string
filterTag - a jQuery selector that matches the elements from the AJAX content source that you want, for example ".myClass" or "#thisDiv" or "div" - string


getHtmlContent
Arguments are:
htmlContent - any raw HTML that you want - string
manipulationMethod - add or replace (default) - string
addWhere - first or last (default) - string


I know this means that people will have to look over their code if they want to upgrade, but in the long run I think it's worth it.

/Thomas

from smooth-div-scroll.

stanislaw avatar stanislaw commented on September 6, 2024

Sorry with the delay.

These are good points! Let me know, when you merge this!

from smooth-div-scroll.

tkahn avatar tkahn commented on September 6, 2024

Implemented in release 1.3!

from smooth-div-scroll.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.