1- En son sürümü kullanın

JQuery’nin en son sürümünü aşağıdaki adresten indirebilirsiniz:

http://jquery.com/download/

2- Basit seçiciler kullanın

$('li[data-selected="true"] a') // yavaş bir seçim
$('li.selected a') // idare eder
$('#elem')  // En iyi performans
$(".sinif") // yerine
$("div.sinif") // bu kullanım daha doğrudur.
vardegisken = $("#menu a.buton"); // yerine
var $degisken = $("#menu a.button"); // bu kullanım daha doğrudur.
$('a.button:animated'); // yerine
$('a.button').filter(':animated'); // bu kullanımı daha doğrudur.

3- Boş JQuery nesnesi oluşturmak

JQuery’de boş nesne oluşturmak uygulamayı yavaşlatabilir ancak bazen bu nesneyi kullanıp, daha sonra add() yöntemiyle doldurarak kullanmak gerekebiliyor.

var $container = $([]);
$container.add(eklenecek_eleman);

4- CssHook kullanın

İlgili adresi aşağıda verdim:

http://api.jquery.com/jQuery.cssHooks/

5- Özel hareket fonksiyonlarını kullanın

<div id="elem">Örnek</div>
$("#elem").hide(); // #elem divini gizledik
$('#elem').show("clip"); // clip animasyonu ile g&ouml;r&uuml;n&uuml;r hale getirdik

6- Sayfanızın ağırlığını belirleyin

console.log( $('*').length );

Buradak dönecek değer ne kadar küçükse sayfanız o kadar hızlı açılır.

7- JQuery kodlarınızı eklentiye dönüştürün

(function($){
    $.fn.eklentiAdi = function(){
        //buraya eklentinizin kodları gelecek
        returnthis;
    };
})(jQuery);

8- Global Ajax varsayılanlarını kullanın

$.ajaxSetup({
    url         : '/ajax/',
    dataType    : 'json'
});
$.ajaxStart(function(){
    showIndicator();
    disableButtons();
});
$.ajaxComplete(function(){
    hideIndicator();
    enableButtons();
});
/*
    // Ek y&ouml;ntemler
    $.ajaxStop();
    $.ajaxError();
    $.ajaxSuccess();
    $.ajaxSend();
*/

9- Animasyonlarda delay kullanın

// Yanlış kullanım:
$('#nesne').animate({width:200},function(){
    setTimeout(function(){
        $('#nesne').animate({marginTop:100});
    },2000);
});
// Doğru kullanım:
$('#nesne').animate({width:200}).delay(1000).animate({marginTop:100});

10- HTML5 veri özelliklerini kullanın

<div id="d1" data-role="sayfa" data-last-value="43" data-hidden="true" data-options='{"name":"Samet"}'></div>
$("#d1").data("role");          // değer =&gt; "sayfa"
$("#d1").data("lastValue");     // değer =&gt; 43
$("#d1").data("hidden");        // değer =&gt; true;
$("#d1").data("options").name;  // değer =&gt; "Samet";

Comments

  1. Pingback: porn

  2. Pingback: porn

  3. Pingback: child porn

  4. Pingback: porn

  5. Pingback: child porn

  6. Pingback: porn

  7. Pingback: child porn

  8. Pingback: child porn

  9. Pingback: porn

  10. Pingback: porn

  11. rolivka.online

    great submit, very informative. I wonder why the other experts of this sector don’t notice this.
    You should proceed your writing. I’m confident, you have a great readers’ base already!

  12. Jessika

    You actually make it seem so easy with your presentation but I find this matter to be really something that
    I think I would never understand. It seems too complex and very broad for me.

    I am looking forward for your next post, I’ll try to get the hang of
    it!

  13. Galen

    I do not even know how I ended up here, but I thought
    this post was good. I don’t know who you are but certainly you
    are going to a famous blogger if you aren’t already ;)
    Cheers!

  14. Pingback: sex

  15. Tyrell Dearing

    Congratulations on your incredible gift for writing! Your article is an engaging and enlightening read. Wishing you a New Year full of achievements and happiness!

  16. goltogel

    The article was very engaging. Consider incorporating more visuals to make it stand out. My website can offer some suggestions.

  17. AskSax

    Ищете высококачественной службе доставки цветов? “Цветов.ру” обеспечивает великолепный сервис по доставке цветов в множестве городов, включая такие города, как Нефтекамск на пр. Комсомольском 39, Казань на пр. Фатыха Амирхана 15, Владимир на пр. Ленина 24, и многие другие.

    Не упустите шанс порадовать себя или своих близких удивительным букетом от нашей службы доставки цветов, заказав букет на нашем сайте по услуге https://%D0%BF%D1%80%D0%BE%D0%BA%D0%B0%D1%8238.%D1%80%D1%84/ramenskoye/ – доставка цветов.

    Прибегая к услугам “Цветов.ру”, вы получаете высокое качество букетов, с использованием опытных мастеров флористики. Наши услуги включают более чем стандартную доставку, но и персонализированные варианты, такие как предоставление фотографий букетов до и после доставки.

    Независимо от вашего близкого, будь то места, такие как Янаул, Оренбург, Орехово-Зуево, или Набережные Челны, “Цветов.ру” позаботится о надежной и аккуратной доставке.

    Оформите ваш заказ сегодня и доставьте радость и красоту с “Цветов.ру”, вашим надежным выбором для доставки цветов в разных городах России.

Bir Cevap Yazın

E-posta hesabınız yayınlanmayacak. Gerekli alanlar * ile işaretlenmişlerdir

Şu HTML etiketlerini ve özelliklerini kullanabilirsiniz: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>