Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7801699
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T01:01:39+00:00 2026-06-02T01:01:39+00:00

I am working on creating a jQuery plugin and I have some questions regarding

  • 0

I am working on creating a jQuery plugin and I have some questions regarding how to structure things:

1.How much HTML should the plugin have written and how much should it create through jQuery ?

Is it good to have written all of the HTML so that the entirety of the markup structure is visible when looking over the code ?

Or is it better to have written only the minimum amount of HTML so that it is very easy for the user to add/modify content and create all of the rest, bulky HTML through jQuery ?

Is there a recommended practice ? How are things done in professional plugins ?

Why should things be done in a certain way and what are the reasons behind it ?

2.How to balance the plugin options with the CSS ?

Should the plugin offer options that would affect the presentation of the plugin (options that would modify the stylesheet) or is it a better practice to have the user directly modify the stylesheet for presentational modifications and in the plugin only have options relating to the functionality ?

What are some guides regarding what options to offer in the plugin as to not step over CSS ?

Regarding my experiences, I have seen all of these in different places and plugins and that is why I am asking for opinions from experienced users and what are good practices and why.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-02T01:01:40+00:00Added an answer on June 2, 2026 at 1:01 am

    1. How much HTML should the plugin have written and how much should it create through jQuery ?

    According to the paradigms of progressive enhancement, there should be no markup which would be useless in case of no JS enabled. In other words – if your plugins needs some special markup and additional tags it should create them by itself.

    The reasons for that is semantics. Additional plugin markup is useless for users (and bots) when there’s no JS enabled and thus it should not be present at all.

    Also keep in mind that developing a good JS plugin means that content will still be available when the plugin fails or JS is disabled. Moreover, you have to take additional care about making sure that your plugin is accessible. More on the topic of progressive enhancement covering also more advanced issues can be found for example in a book by The Filament Group.

    2. How to balance the plugin options with the CSS ?

    Do it as follows:

    • Content: HTML
    • Logic: JS
    • Presentation: CSS

    Despite the fact it’s changing now a bit (think CSS3 animations), options of the plugin may influence the way it works rather than the way it looks. That means your users should be able to config timings, delays, speed, number of element or whatever your plugin is doing through JS. But leave the presentational aspects in the CSS stylesheet. Use JS to change classes of elements rather than inline styles and let your users write whatever CSS they want. Obviously, don’t forget to provide some default styling 🙂

    I always recommend reading more on the topic in A List Apart. It’s quite a theoretical article but absolutely a must-read for any front-end dev.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm working on a jQuery plugin and I have a few questions about some
I seem to be having some problems creating a jquery plugin. I am testing
I'm creating a jQuery plugin. So far it's working fine, but I'm having doubt
I am working on a jQuery plugin and I would like some opinions from
I am creating a small HTML editor using jQuery. I have created my own
Okay I am working with some jquery creating dynamic popups. However, periodically the response
I'm working on a JQuery plugin and I am having a problem when creating
I am currently working on creating a webpage photo gallery. I have a ton
I am working on creating an immutable class. I have marked all the properties
I'm creating a custom jQuery plugin to add a few images above an input

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.