menu search
brightness_auto
more_vert

Aşağıdaki JavaScript kodu,  item-avatar-meta  HTML öğesini item-stats sınıfı olan bir HTML öğesine taşır:

javascript

$(document).ready(function(){

    var elem = $(".item-avatar-meta").detach();

    $(".item-stats").append(elem);

});

Yukarıdaki kod, $(document).ready fonksiyonu ile sayfa yüklendiğinde çalışacak işlevi belirtir. İşlevin içinde, item-avatar-meta sınıfına sahip HTML öğesi .detach() fonksiyonu ile sayfadan kaldırılır ve bir değişkene atanır. Daha sonra, item-stats sınıfına sahip HTML öğesi .append() fonksiyonu ile kaldırılan öğe sonuna eklenir.

Bu işlevi sayfanızda jQuery kütüphanesi yüklendikten sonra bir <script> etiketi içinde kullanabilirsiniz. Örneğin:

html

<!DOCTYPE html>

<html>

<head>

  <meta charset="UTF-8">

  <title>Örnek Sayfa</title>

  <script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>

  <script>

    $(document).ready(function(){

        var elem = $(".item-avatar-meta").detach();

        $(".item-stats").append(elem);

    });

  </script>

</head>

<body>

  <div class="item">

    <div class="item-stats">Soru İstatistikleri</div>

    <div class="item-avatar-meta">Avatar ve Meta Verileri</div>

  </div>

</body>

</html>

Yukarıdaki örnek kod, item-stats ve item-avatar-meta sınıflarına sahip iki HTML öğesi içerir. JavaScript kodu, item-avatar-meta sınıfına sahip olan öğeyi item-stats sınıfına sahip olan öğenin sonuna ekler. Bu şekilde, öğelerin sırası değişmiş olur.

thumb_up_off_alt 1 beğenilme thumb_down_off_alt 0 beğenilmeme

1 cevap

more_vert
Tesekkurler bro
thumb_up_off_alt 0 beğenilme thumb_down_off_alt 0 beğenilmeme
more_vert
Winston here from Iowa. I'm always watching to see what newer sites are going up and I just wanted to see if you would like an extra hand with getting some targeted traffic, create videos/images/adcopy, the list goes on.  I'll even shoulder 90% of the costs, dedicating my time and tools that I've created myself and bought over the years.  I've been doing this for over 22 years, helped thousands of people and have loved every minute of it.

There's virtually no cost on my end to do any of this for you except for my time starting at 99 a month. I don't mean to impose; I was just curious if I could lend a hand.  

Brief history, I've been working from home for a couple decades now and I love helping others.  I'm married, have three girls and if I can provide for them by helping you and giving back by using the tools and knowledge I've built and learned over the years, I can't think of a better win-win.

It amazes me that no one else is helping others quite like I do and I'd love to show you how I can help out.  So, if you need any extra help in any way, please let me know either way as I value your time and don't want to pester you.

PS – If I didn’t mention something you might need help with just ask, I only mentioned a handful of things to keep this brief :-)


Happy Holidays & Almost New Year,

Winston
Cell - 1-319-435-1790‬
My Site (w/Live Chat) - https://cutt.ly/9wEWIZbQ

İlgili Başlıklar

thumb_up_off_alt 0 beğenilme thumb_down_off_alt 0 beğenilmeme
0 cevap
thumb_up_off_alt 0 beğenilme thumb_down_off_alt 0 beğenilmeme
0 cevap
thumb_up_off_alt 0 beğenilme thumb_down_off_alt 0 beğenilmeme
0 cevap
thumb_up_off_alt 1 beğenilme thumb_down_off_alt 0 beğenilmeme
0 cevap
thumb_up_off_alt 0 beğenilme thumb_down_off_alt 1 beğenilmeme
1 cevap
...