Q:

JQuery only append to child

Somehow this userscript seems to append the  attributes to the parent instead of the child :c
Please help me to understand why it's doing that :o
// ==UserScript==
// @name        GMod Cinema Porn
// @namespace   Bluscream
// @version     1.0
// @description H3H3
// @author      Bluscream
// @include     https://www.youtube.com/embed/OiMTuwS3xvg*
// @include     http://cinema.pixeltailgames.com/search.html
// @include     *
// @grant       unsafeWindow
// @grant       GM_xmlhttpRequest
// @require     https://cdnjs.cloudflare.com/ajax/libs/jquery/3.0.0/jquery.min.js
// @run-at      document-end
// ==/UserScript==
(function() {
    'use strict';
    if (window.location.href.startsWith("https://www.youtube.com/embed/OiMTuwS3xvg")) {
        window.location.href = "http://embed.redtube.com/player/?id=42019&autostart=true";
    } else if (window.location.href == "http://cinema.pixeltailgames.com/search.html"){
        $ = jQuery || $;
        $( document ).ready(function() {
            temop = $('#content-container').children('div[style="text-align:center;font-size:0;"]:first');
            temop.append('<service>').css('background-image', 'url("http://cdn1-www.craveonline.com/assets/uploads/2013/12/man_file_1048340_youporn-icon.png")').click(function () {
                window.selectService("YouPorn", "http:\/\/www.youporn.com");
            }).hover(function () {
                window.hoverService();
            });
        });
        //$('#content-container>div[style="text-align:center;font-size:0;"]').append('<service style=\'background-image:url(\"logos\/youtube.png\")\' onclick=\'selectService(\"YouTube\",\"http:\/\/www.youtube.com\")\' onmouseover="hoverService()">-</service>');
    }
})();

A:

Because jQuery elements are chainable, using .append() will return the previous element, not the element that was just appended.
The appended element will need to be targeted before applying attributes & event listeners; something like this:
temop
  .append('<service>')
  .find('service:last')
  .css(/* ... */)
  .click(/* ... */)
  .hover(/* ... */);

