Adding an invisible document name in XSLT or HTML

I have this XSLT document that has a file name. However for archiving purposes we want the file name to be displayed somewhere else within the code.

Now I used to do this like this:

<xsl:stylesheet version="1.0" 
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    sample-xml=".\DOCUMENTNAME.xml"
    xmlns:v="urn:schemas-microsoft-com:vml"
    xmlns:o="urn:schemas-microsoft-com:office:office">

However we want to get rid of this solution due to new working methods. Now I was wondering if I could place this (literally just the word DOCUMENTNAME) somewhere within the XSL or within the HTML wrapped within it, in a way that it is not visible.

We add this code to a database, through a validator that looks for the documentname and checks for a match. And as only the contents of the code is placed on the database its easier to check back from the database what documentname was uploaded. However this documentname should not be visible in an HTML output.

ion-buttons with buttons (Ionic 3)

I use ion-buttons for create one space with two buttons. I need allocate one button in right and other button in left, but don’t it work, the buttons stay misaligned.

Image for better visualization of the problem:
Image for better visualization of the problem

<ion-footer>
    <ion-toolbar>
        <!--Testes-->
        <ion-buttons>
            <button ion-button color="dark" (click)="btn_reportlog()">Reportar Log</button>
            <div class="btn_right"><button ion-button color="danger" (click)="btn_deletlog()">Excluir Log</button></div>
        </ion-buttons>
    </ion-toolbar>
</ion-footer>

How can I prevent transparent background-color blending?

I have the following code:

.wrapper {
  background-color: rgba(0,0,255,1.0);
}

.inner {
  background-color: rgba(255, 0, 0, 0.5);
}
<div class="wrapper">some text<span class="inner">other text</span></div>

My intention was that the <span> would have a light red color but instead I got red blended with the wrapper blue.
Is there any easy way to make this work as I expected?

Prevent multiple click event when clicking child element [duplicate]

This question already has an answer here:

I have a list of elements.

Each element have a global click event and a child icon which should also be clickable.

Example :

<div class="parent-element" (click)="clickParent()">
   <span class="button" (click)="childClick()">
   </span>
</div>

For now when I click on the span, both click are fired. How can I separate it from the parent click event ?

bootstrap defining space between the divs without leaving the place [duplicate]

This question already has an answer here:

I’m creating a card with html, css and bootstrap and I’m using the bootstrap class col to define the columns. My problem is when separating the divs, how is it possible to define 3 divs with col 4 and get a space between them without leaving the place? when I give a style of margin-left: 5px; for example, the third div goes to the bottom line

enter image description here

Convert a JS variable value into another [on hold]

I like to transform a variable value into another.
At the moment I am trying this, but it doesn’t work…

var fromFirst = $(this).find("span.from").html();
if (fromFirst === 2018) {
    var from = 100;
} else {
    var from = 50;
}

Any ideas?

EDITED:

I am working with ACF. The idea is when someone inserts a number, such us 2018, transform that number into 100, but this code is not outputting the new values.

You can see the code working here

JQuery function overrides submit action and works only on second click

Hello I’m developing a website and wanted to add discount counter which takes value from element with price and calculates it with hidden attribute. It should work everytime user changes something in form-basket class. The problem is that it disables submit button action and price update, works only after second or third change in form. What could be the issue of such behavior? Here’s the website for test
Kup teraz button is the submit one

$(document).ready(function() {
    function promo_price() {
        if (document.getElementById('przecenajs')) {

            var cena = 0;
            var stara_Cena = 0;
            var procent = 0;
            cena = jQuery('#przecenajs').attr("data-cena");
            procent = jQuery('#przecenajs').attr("data-procent");
            cena = parseInt(cena);
            procent = procent / 100;
            console.log(procent);
            console.log(cena);
            stara_Cena = jQuery('.main-price').html();
            console.log(stara_Cena);
            stara_Cena = stara_Cena.substring(0, 5);
            console.log(stara_Cena);
            stara_Cena = parseInt(stara_Cena.split(',').join('.'));
            console.log(stara_Cena);
            if (!isNaN(cena)) {
                cena = parseInt(cena);
                stara_Cena = parseInt(stara_Cena + cena);
                $('.staraCena').remove();
                jQuery('.promojswynik').append('<span class="staraCena"><del>' + stara_Cena + ',00</del></span>');
            } else if (!isNaN(procent)) {
                stara_Cena = parseInt(stara_Cena * procent + stara_Cena);
                $('.staraCena').remove();
                jQuery('.promojswynik').append('<span class="staraCena"><del>' + stara_Cena + ',00</del></span>');
            }
            cena = 0;
            stara_Cena = 0;
            return false;
        }
    }
    promo_price();
    $('.form-basket, input:not(input[type="submit"])').on("change click keyup blur keypress", promo_price);
});

Getting value from HTML object in PHP

I have an html object:

<a href="https://website/" class="td-post-category" value="News" >News</a>

Which I get from typing $this->get_category(); in PHP.

My question here is if it is possible to get the value-field(News) from the HTML-object inside of PHP. Something like $this->get_category().value or $this->get_category()->value. Like we could in Javascript.

Or if you know how to “extract” variables from functions. Like if I had a variable named $selected_category_obj_name in the function get_category(), how to get this value when I have written $this->get_category(), how can I get the variable $selected_category_obj_name?

I am new to PHP, so some guiding would be very appreciated.

Deleting the first listitem from an unordered list without using the listitems id

I need to remove li on first place. How can I do it without using id of first li in the list? Because id can change and I need a method that works for every li.

My code:

<ul id="fortask1" class="adds">
  <li id="lik4" class="lid">..</li>
  <li id="lik3" class="lid">..</li>
  <li id="lik2" class="lid">..</li>
  <li id="lik1" class="lid">..</li>
</ul>