Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
I need to know:
with some of what position people select the text
and add text around it full of tag with his class.
Wherein:
report should be based on HTML tags
without such as span and link (a)
Example:
I marked this as a duplicate but the comment afterwards meant a response may be needed.
If you look at the only answer here: Get the highlighted text position in .html() and .text()
you will find that there is mention of
Reference
.wrap()
.before()
.after()
You should be able to use those along with the second part of the answer to add in any tags you want to the selected text.
Related
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 2 years ago.
Improve this question
In inspect element, I added a space functions and it was succesfull.
Image of added space
I put it between tag <a/> and </span>. It's correct location and not different with inspect element section.
redirect function
But it is still failing all over and over...
Incorrect space
Use entity to add spaces in between tags, use <br> to add line-break to your tags
Either way you can use css to this to add spacing. In your span:
CSS
span.showpageNum {
margin-right:10px; // or any px you want to adjust spacing
display:inline-block;
}
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 5 years ago.
Improve this question
How can I add text to the text area in the new tab that opens when I hit the "tweet button" (twitter.com/intent/tweet) using JavaScript? This problem has happened to me while doing my Random Quote Machine project in CodeCamp. I have tried things related to the data-text attribute but didn`t work.
I think you should put the text in the href link button (see the twitter API):
href='https://twitter.com/intent/tweet?hashtags=quote&text="I begin by taking. I shall find scholars later to demonstrate my perfect right.", Frederick (II) the Great'
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
Using bootstrap I create one accordion panel-group that is populated with several panel-default and want to add a live search box to show only the panels that the user needs.
I found some examples of how to do that but with <nav>, <ul> and <li> tags, I tried to do it with the <div> tags but I can't make it work.
Here's what you request
with the fiddle you are using just change the loop selector
for this $("#panel, .panel-group, .panel-heading, .panel-body, .panel-default")
You can iterate through the classes what you want adding a . and the name of the class, # and name of the id for id's and if is there more than one just separate it by comma. The .each() is gonna search into all that elements and search you want.
https://jsfiddle.net/geradrum/yarn8kw2/1/
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this question
I am trying to change CSS elements depending on situations used in javascript.
an example I had tried was:
if ('image'=="clicked")
{blahblahblah}
'image' would be my div id or div tag in CSS.
I know in Jquery I can use $('#image').click, but I don't think it Jquery will be good for my situation.
Consider document.querySelector. It's powerful, accepting any valid CSS selector. You can even start from another element, such as myElement.querySelector, to only get children of that element that match the selector. Very useful!
Just be aware that IE7 and below do not support this function.
Assuming your id as image
document.getElementById('image').onclick = function() {
alert("button was clicked");
};
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I'm making a php mysqli forum, and i would like users to be able to style their posts so it doesn't look so dull.
I want some basic buttons, like [Header1,Header,Header3,Normal,] and also [italic,bold,underlined]
I now have two questions,
1.
How do I make the buttons and style the textarea?
How do i get styled text into a mysql db?
Thanks in advance.
Daniel Holst
Use things like TinyMCE, it as all the things you need and manymore. It will make you textarea a full richtext editor.
You can't do it as is without any javascript.
You can use another editor.
To get styled texte from you database, you need to save the text with the formatting before restoring it.