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 7825751
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T09:08:09+00:00 2026-06-02T09:08:09+00:00

I am working on a jQuery plugin and I would like some opinions from

  • 0

I am working on a jQuery plugin and I would like some opinions from more experienced people about good practices of integrating the HTML, CSS and JavaScript code.

Specifically:

1.HTML code – static vs dynamic

Is it good to write only the bare minimum of HTML markup and dynamically create the rest of the needed HTML code through JavaScript, in the plugin ?

Or is it better to just manually write all of the needed HTML ?

Only the minimum HTML looks cleaner and easier to modify, all of the required HTML might be better to fully understand, customize and work with the plugin, as you see the entire structure of the code.

2.CSS code – in JavaScript or external

Is it good to create and apply the CSS code dynamically, in JavaScript, or have the CSS code external, in a CSS file ?

If the CSS is internal, it is dynamically created based on the specified properties of the plugin. There will be more properties, but all of the settings are specified in one place, in the settings of the plugin.

If the code is external, the user needs to edit the CSS in order to modify the different options available.

On the one side, having minimal HTML and dynamically created CSS seems easier for the user to understand, on the other, having all the HTML and external CSS seems more powerful and better for more advanced plugins.

What I am looking for are some pointers from experienced users on good practices about integrating the HTML, CSS and JavaScript in creating a plugin.

  • 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-02T09:08:10+00:00Added an answer on June 2, 2026 at 9:08 am
    1. Is it good to write only the bare minimum of HTML markup and dynamically create the rest of the needed HTML code through JavaScript, in the plugin ?

    Yes, this is how jQuery UI plugin(and most other plugin) works.

     2.CSS code – in JavaScript or external?

    It depends how much the css rules are complicated, in jQuery UI they use a css file, in jQuery Validation they don’t.

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

Sidebar

Related Questions

I am working on a jQuery plugin and I would like for the user
I'm currently working with JQuery plugin for struts2. I would like to know how
I have a jQuery plugin that I'm working on that I would like to
I am working on a jquery plugin which takes json data from the php
I read a lot of good things about jqGrid on SO and would like
I would like to get an object from its name in Javascript. I'm working
I'm currently working on a jQuery plugin and I'm wondering if it would be
Currently I am working on an plugin for jQuery. In some jQuery functions you
I'm working with a jQuery plugin that has this: var $el = $(this), $wrapper
I am trying to get this awesome JQuery plugin working with SQL Server. I

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.