There is such a code:
$(document).ready(function(){ $('.update-plugins').each(function(){ if ($(this).data('url')) { $.get( $(this).data('url'), function( data ) { $(this).children('.plugin-count').text(data); }); } }); }); <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script> <span style="background: green;" class="update-plugins count-2" data-url="/getQMails/index.php" title="Писем в очереди на отправку..."><span class="plugin-count"></span></span> It does not work, although at the address /getQMails/index.php in an AJAX request, the desired value is /getQMails/index.php , somewhere messed up in the line:
$(this).children('.plugin-count').text(data);
getthis is not an element - Grundy