How to hide content of a html element [closed] - javascript

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 8 years ago.
Improve this question
I have an "a" tag to which I've applied a background image.
Now I want to hide only the html content of the "a" tag, while I need the background and href address to remain there.
Thanks for the help.

This should work: $("#a_tag_id").html("");

Related

how to get data from a span inside a div with javasript [closed]

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 2 years ago.
Improve this question
I have a div with a class and inside it I have a button and a span.
How do I get the data from the span only using JavaScript?
<div _ngcontent-c26 class="ad" fieldname="xzc" panelname="zx">
<span _ngcontent-c26>12345678</span>
<button>hello</button>
</div>
You can use querySelector to target elements in the DOM with a CSS style syntax - perhaps like:
let div=document.querySelector('div.ad[fieldname="xzc"][panelname="zx"]')

How to make our animation not to carry out at the beginning, only after clicking? [closed]

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 2 years ago.
Improve this question
I want that animation to make it after clicking the menu button. I tried if and function, but it didn't work out. Click here for code
Like this?
You need to move your menuAnim code into a click listener.
https://codepen.io/nisharg/pen/abvJxKL

How to change Browser button name? [closed]

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 6 years ago.
Improve this question
As I am new in UI development ,Kindly help to provide solution. How to change the Browser button name by using jquery.
That would be $('selector').text('some other name')
If your element is an <input>, then you can use $('selector').val('some other name')

How to query the embeded contents of an iframe to check for the presence of an ID [closed]

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 7 years ago.
Improve this question
I'm curious if a javascript based script can search the embedded website's html and return a true/false value on the existence of ID #foo in its contents
.contents() might be useful for you to read!

jQuery Hide Element Containing Text [closed]

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 7 years ago.
Improve this question
On a page, how can I hide the containing the with the text "Product Tags"?
$('h2:contains("Product Tags")').hide();
See jquery find element by text and :contains()

Categories