Questions tagged [prepend]

Add content on to the beginning of something (usually a file).

497 questions
6
votes
3 answers

jQuery move node out of its parent

I have this code: I want the images…
YeppThat'sMe
  • 1,812
  • 6
  • 29
  • 45
6
votes
3 answers

Removing text that was appended previously

I have a highlighting function using JQuery, that changes the css for the clicked
  • element in a menu. The function also prepends a pair of left brackets << to serve as pseudo arrows. But how do I remove that << when I switch to the next
  • Tom
    • 2,928
    • 4
    • 28
    • 36
    6
    votes
    2 answers

    Prepending Data to a File

    There's no way in any operating system I'm aware of for a program to prepend data to a file efficiently. And yet, this doesn't seem difficult -- the file system can add another extent to a file descriptor if needed. So the question is, why don't…
    user541686
    • 205,094
    • 128
    • 528
    • 886
    6
    votes
    4 answers

    prepend/append works in Chrome and Firefox but not IE11 and Edge

    Trying to prepend data inside a text box in Chrome and Firefox works. Get error: SCRIPT438: Object doesn't support property or method 'prepend' in IE11 and Edge. Thx function init_TGs(){ if (confirm("Initialize TinyG's?")){ …
    creeser
    • 363
    • 1
    • 4
    • 11
    6
    votes
    1 answer

    React Native - How to prepend AND append data in ListView without full re-render

    I've been working really hard to solve this problem for a long time now. I've looked at StackOverflow AND other issues for a solution but I couldn't find a clear one. I know that I can prepend WITH full re-render, but I don't know how I can prepend…
    김진규
    • 77
    • 8
    5
    votes
    3 answers

    Can I create a self-closing element with createElement?

    I'm trying to append a line of HTML before all the children of the body. Right now I have this: // Prepend vsr-toggle var vsrToggle = document.createElement("div"); vsrToggle.innerHTML = "
    Aaron Benjamin
    • 1,291
    • 3
    • 18
    • 27
    5
    votes
    2 answers

    jquery prepend to textarea text()

    I have a text area. I can set the text of it with $("#mytextarea").text("foo") I can prepend to the text area like this: $("#mytextarea").prepend("foo") But I cannot prepend to the jquery text() object like…
    shino
    • 4,562
    • 5
    • 38
    • 57
    5
    votes
    1 answer

    prepend string to entire column in mongodb

    I would like to prepend a string to all values of a mongo collection's column. Something like db.testcoll.update({},{$set:{column1 : "prependstring"+ column1}}); Is there something like this ?
    thegrid
    • 509
    • 1
    • 6
    • 20
    5
    votes
    2 answers

    How to prepend to a StringBuilder?

    VB.NET have a method, just like java, to append to an object of type StringBuilder But can I prepend to this object (I mean a add some string before the stringbuilder value, not after). Here is my code: 'Declare an array Dim IntegerList() = {24,…
    Amaynut
    • 4,091
    • 6
    • 39
    • 44
    5
    votes
    1 answer

    Javascript Object - prepend object to existing object

    I have this javascript objects. I want to add this javascript object to the beginning of the jsObject variable:
    coffeemonitor
    • 12,780
    • 34
    • 99
    • 149
    5
    votes
    3 answers

    Add .css() to prepended div

    This prepend function adds a div with the "colorBox" class, but I'm having trouble setting the css for the newly created div. I don't know if my syntax is quite right, but I'm trying to use the data-background value in the parent (li) tag. I'm…
    Chaya Cooper
    • 2,566
    • 2
    • 38
    • 67
    5
    votes
    4 answers

    Apache or PHP generating prepending line feed character

    I am trying to generate an XML file in a PHP web application: \r\n" . ... Bizarrely, when using my…
    Gruber
    • 4,478
    • 6
    • 47
    • 74
    5
    votes
    1 answer

    jQuery prepend - prevent auto scroll

    I was just working around with jQuery prepend and couldn't get it to work as expected. What I am doing: Prepending a .content div to #main div every one second But, when I scroll down a bit [once the page is full of content], I keep getting…
    Prasanth
    • 5,230
    • 2
    • 29
    • 61
    5
    votes
    7 answers

    jQuery - how to undo prepend

    I am using the prepend() function to diplay an image when a div is hoevered over. How do I remove the image - i.e. what is the opposite of prepend() Here is the code: $("#hover-div").hover( function() { $("#image-div").prepend("
    Ankur
    • 50,282
    • 110
    • 242
    • 312
    4
    votes
    4 answers

    C# prepending bytes to the beginning of a file?

    What is the fastest and most efficient way to prepend bytes at the beginning of a file? Basically, I want to open a file and then add a number of bytes to it. I thought of using a loop, but given that all of the bytes to prepend are the same, I…
    dnclem
    • 2,818
    • 15
    • 46
    • 64