• jlim
jLim – compact JavaScript framework

jLim ist ein Mini-JavaScript-Framework (Paket ~ 13kb minifiziert) und enthält die am häufigsten verwendeten Funktionen von jQuery. Ideal für weniger komplexe Websites. jLim ist von Grund auf neu, hat aber eine Schnittstelle, die ungefähr gleich jQuery ist.

jLim enthält die folgenden Module:

  • Kern (~ 2,5 kb)
  • URTEIL (~ 2.3kb)
  • CSS (~ 1.3kb)
  • Veranstaltung (~ 2.3kb)
  • Ajax (~ 0,5 kb)

Und enthält die (externe) Komponenten, im Paket enthalten:

Wie es funktioniert?

$('A').attr('Title', 'Link');

$('# Btn').removeClass("Aktiven");

Sie haben = $('li').Größe();

var el ='If'39;).bekommen(1);

Beispiel für die Verkettung

$('# Wrapper ")
	.find('P')
		.html("Lorem ipsum ...")
		.eq(2)
			.css('Background-color', '# Ff0000')
		.end()
	.end()
	.find('Taste')
		.klicken(Funfindenn(){
			$(dieser).addClass('Highlight');
		})
	.end();
als

API-Dokumentation

Herunterladen

Sie können die neueste Version von Github.

Browser-Unterstützung

Getestet in IE6 , FF, Opera, Chrome und Safari (für Windows).

Lizenz

Kodex fällt unter die MIT Lizenz.

In Verbindung stehende Artikel

Fork me on GitHub

Kommentare (9)

  • do you plan an event modul ?

  • Here you go….jLim Event Plugin

  • This is an amazing mini js framework.

    Just starting to sink my teeth into it. No going back to jQuery now.

    Thanks for creating jLim ;)

    Alex

  • Again: this is just really really nicely done – only bit I miss slightly when working with complex code is jQuery’s deferred object – but this is tiny issue compared to the overall brilliance of having access to most of the basic features from jQuery is such a small library.. Thanks!

  • So when are you going to put this project up on github so we can all start forking and keeping up with updates?

    This is a great beginning for those simple sites that don’t need 30kB+ of extra Javascript code to parse on each page.

  • Good point David. I try to put it on Github this week.

    And Janus, that way anyone can add an extention, like a deferred object ;)

    @Alex: Thanks!

  • Is there any way to return a node/element index like jQuery’s index() function?

    Alex

  • @Alex You could use this code:

    (jLim.core || jLim.fn).extend({
        index: function (element) {
            var el = jLim(element).get(0);

            for (var x = 0, y = this.length; x < y; x++) {
                if (this.els[x] === el)
                    return x;
            }

            return null;
        }
    });

    Examples:

    $('button').index(document.getElementById('btn-test1'));
    $('button').index('#btn-test1');
    $('button').index($('#btn-test1'));

    It doesn't work exactly like jQuery's index, but this should do the job.

  • Awesome! cheers Victor.

    Keep up the good work on jLim

Ihre Meinung

  • RSS
  • LinkedIn
  • Twitter