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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T07:02:49+00:00 2026-06-02T07:02:49+00:00

For my project i need to use the jQuery Rule Plugin Its looks like

  • 0

For my project i need to use the jQuery Rule Plugin

Its looks like great ,so that i can append new css rules to the dom.

but how can i create a new rule and append it to the dom ??

The documentation says that :

These are the methods, the plugin adds to the different namespaces.

jQuery.fn
 - sheet: returns the stylesheets from the matched styles and links.
 - cssRules: return all the rules from all the given sheets.
 - ownerNode: returns the nodes that belong to the given sheet (opposite to sheets).
 - cssText: returns the text of the first matched style/link.

jQuery.rule
 - constructor( $.rule ):
    - 1st argument: nothing, a rule filter, rule literal, css rule or array of rules.
    - 2nd argument: nothing, node filter for link/style, nodes link/style.
 - sheets: returns the sheets that match the selector or all of them if none.
 - clean: converts a rule literal, to array of rules.
 - parent: returns the parent of a rule, neccesary for IE.
 - outerText: return the selector with the rules of the given rule.
 - text: gets/sets the cssText of the rule.

jQuery.rule.fn
 - append: will add one or more styles in the form of "attr:value; attr:value" to the matched rules.
 - css : sets a value to all matched rules.
 - outerText: return $.rule.outerText of the first rule.
 - text: sets the cssText of the rules, or gets the cssText from the first one.
 - appendTo: appends the matched rules to the specified stylesheet(1), can be a selector, dom element, sheet.

All these methods ( from jQuery.rule.fn ) are equal (or very similar) to those in jQuery.fn, but for CSS Rules.
    add, andSelf, animate, appendTo, attr, css, dequeue,
    each, end, eq, fadeIn, fadeOut, fadeTo, filter, get,
    hide, index, is, map, not, pushStack, queue, remove,
    setArray, show, size, slice, stop, toggle.

Some calls to show and hide behave unexpectedly sometimes. Some styles and animations might fail.

Please help me .

Thank you.

Note: i am sure it may be very easy to do if you know something about jQuery but it will make it hard if you are a newbie,i tried google to get some info about this,but cant find anything. I am familiar to the question What you tried ? ,here i dont know !! please this is a start. Thank you !

  • 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-02T07:02:50+00:00Added an answer on June 2, 2026 at 7:02 am

    Basic example:

    $.rule('#some_id','style').append('font-size:17px');
    

    In this example its a rule that will add new style to css id named ‘some_id’. It will append new css rule setting font-size to 17px;

    So basically You are creating new rule using “$.rule” keyword with parameters described here http://flesler.webs.com/jQuery.Rule/API.txt

    You can get more examples here : http://flesler.webs.com/jQuery.Rule/

    Of course first You need to include jquery and this plugin in You document for eg. like this:

    <script type="text/javascript" src="jquery.js"></script> 
    <script type="text/javascript" src="jquery.rule.js"></script>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to use the JQuery cookie plugin in my project but I'm
I am working on asp.net project and each time i need to use jquery
I need to use autocomplete (In particular I try it with this plugin http://scottreeddesign.com/project/jsuggest
I want to use jQuery datepicker localize in our MVC project, but I can't
In my project I need to use third party code, stored in several Git
As part of my project I need to use some Unamanged code dlls in
I am doing a project and need to use the facebook API as user
I need to use a many to many relationship in my project and since
I need to use IBM Informix for my project where I have point coordinates
I need to use one of my VB.NET projects in a C++ project. The

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.