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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T12:01:07+00:00 2026-06-13T12:01:07+00:00

I try’d to minify this little plugin with this minifier , but it comes

  • 0

I try’d to minify this little plugin with this minifier, but it comes out wrong.
(* a.b and c are undefined, etc*)

Does anybody see what’s wrong, or is there some online tool too check if it is valid?

thanks, Richard

EDIT *PLUGIN is without errors now*

(function($) {

$.fn.bar = function(options) {
    var opts = $.extend({}, $.fn.bar.defaults, options);
    return this.each(function() {
        $this = $(this);
        var o = $.meta ? $.extend({}, opts, $this.data()) : opts;

        $this.click(function(e){
            if(!$('.jbar').length){
                var _remove_cross = "";
                timeout = setTimeout(function(){$.fn.bar.removebar();},o.time);
                var _message_span = $(document.createElement('span')).addClass('jbar-content').html(o.message);
                _message_span.css({"color" : o.color});
                var _wrap_bar;
                _wrap_bar   = (o.position == 'bottom') ? 
                 $(document.createElement('div')).addClass('jbar jbar-bottom'):
                 $(document.createElement('div')).addClass('jbar jbar-top') ;

                _wrap_bar.css({"background-color"   : o.background_color});
                if(o.removebutton){
                    _remove_cross = $(document.createElement('a')).addClass('jbar-cross');
                    _remove_cross.click(function(e){$.fn.bar.removebar();});
                }
                else{               
                    _wrap_bar.css({"cursor" : "pointer"});
                    _wrap_bar.click(function(e){$.fn.bar.removebar();});
                }   
                _wrap_bar.append(_message_span).append(_remove_cross).hide().insertBefore($('.content')).fadeIn('fast');
            }else{
                $('.jbar').find('.jbar-content').html(o.message);
            }
        });

        if(o.auto)$this.trigger('click');

    });
};
var timeout;
$.fn.bar.removebar  = function(txt) {
    if($('.jbar').length){
        clearTimeout(timeout);
        $('.jbar').fadeOut('fast',function(){
            $(this).remove();
        });
    }   
};
$.fn.bar.defaults = {
    background_color    : '#FFFFFF',
    color               : '#191919',
    position            : 'top',
    removebutton        : false,
    time                : 8000,
    auto:true
};
})(jQuery);
  • 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-13T12:01:08+00:00Added an answer on June 13, 2026 at 12:01 pm

    You could use the online version of UglifyJS or use the source on GitHub so you can use it for yourself.

    Minified version,

    (function(e){e.fn.bar=function(n){var r=e.extend({},e.fn.bar.defaults,n);return this.each(function(){$this=e(this);var n=e.meta?e.extend({},r,$this.data()):r;$this.click(function(r){if(!e(".jbar").length){var i="";t=setTimeout(function(){e.fn.bar.removebar()},n.time);var s=e(document.createElement("span")).addClass("jbar-content").html(n.message);s.css({color:n.color});var u;u=n.position=="bottom"?e(document.createElement("div")).addClass("jbar jbar-bottom"):e(document.createElement("div")).addClass("jbar jbar-top"),u.css({"background-color":n.background_color}),n.removebutton?(i=e(document.createElement("a")).addClass("jbar-cross"),i.click(function(t){e.fn.bar.removebar()})):(u.css({cursor:"pointer"}),u.click(function(t){e.fn.bar.removebar()})),u.append(s).append(i).hide().insertBefore(e(".content")).fadeIn("fast")}else e(".jbar").find(".jbar-content").html(n.message)}),n.auto&&$this.trigger("click")})};var t;e.fn.bar.removebar=function(n){e(".jbar").length&&(clearTimeout(t),e(".jbar").fadeOut("fast",function(){e(this).remove()}))},e.fn.bar.defaults={background_color:"#FFFFFF",color:"#191919",position:"top",removebutton:!1,time:8e3,auto:!0}})(jQuery)
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Try this: $test = array (2+2); var_dump($test); Then try the same but inside a
Try this out: template <typename T> class Base { public: int someBaseMember; }; template
Try this code - import java.io.StringReader; public class StringReaderTest { public static void main(String[]
Try this piece of code - public class WhitespaceTest { public static void main(String[]
try: recursive_function() except RuntimeError e: # is this a max. recursion depth exceeded exception?
try { FileOutputStream out = new FileOutputStream(p1); pictureTaken.compress(Bitmap.CompressFormat.PNG, 90, out); out.close(); } catch (Exception
Try this: Make a new XCode4 Applescript project. In the delegate, paste this code:
Try this: <div style=float:left><p>LEFT</p></div> <div style=float:right><p>RIGHT</p></div> <div><p> <input type=text style=width:100% /> <input type=submit />
Try this showcase: <!doctype html> <html> <head> <style> html { min-height: 100%; overflow-y: scroll;
Try to change submodule as described in git book $ git rm -r vendor/html-minifier

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.