I am writing a PHP site. On the page there is a block "Continue / Hide" text. I wrote this like this:

<div id="myText"> Мой текст</div> <p id="listSwitch" class='host_js'>Продолжать...</p> <script type="text/javascript"> $(document).ready(function () { $('#myText').fadeOut(0000); $('#listSwitch').toggle(function () { $('#myText').fadeIn(1000); $(this).text('Скрыть') }, function () { $('#myText').fadeOut(1000); $(this).text('Продолжать...') }) }); </script> 

Only I added this code directly to http://localhost/phpmyadmin/ to my database. Tell me how you can make it so that I can add the code directly from the admin. Just so that every time I would not write it with my hands, well, maybe it could be put through a button.

  • Here explain how you can sit at the writing of the project, without knowing the basics? It is like starting to build a car, not understanding the principle of the engine. Like, I know how the wheels spin, and then we'll figure it out: ( - Deonis
  • 3
    after reading the question (10 times), I had a sensation of anxiety and an overwhelming desire to press the corresponding button ... - Vitalii Maslianok
  • 2
    I could not resist. @Hmayak, please rewrite the question using the rules of the Russian language and the button 101010 to format the code. - Sh4dow

1 answer 1

So that you do not hemorrhoids from the database and php.

I will advise a little.

You take this code

 <div id="myText"> Мой текст</div> <p id="listSwitch" class='host_js'>Продолжать...</p> <script type="text/javascript"> $(document).ready(function () { $('#myText').fadeOut(0000); $('#listSwitch').toggle(function () { $('#myText').fadeIn(1000); $(this).text('Скрыть') }, function () { $('#myText').fadeOut(1000); $(this).text('Продолжать...') }) }); </script> 

You paste it in a notebook, Word - any text editor. Save! And as needed copy / paste.

The best solution for you. ;)

  • Well, thanks, as I did not think about it. Guys, it seems to me if you do not have an answer, you just don’t have to say anything. It seemed to me that normal programmers are responding here, but this is not the case. Just for sure you didn’t collect the address on the browser. - Hamo
  • one
    For those who will read this answer, I focus your attention: The most excellent solution for you . ;) - Zowie
  • 2
    > Just surely you have the address on the browser not collected. wtf !? - Vitalii Maslianok
  • one
    I'm in a stupor how to be what to do> if you don’t have an answer, you just don’t have to say anything> you probably didn’t collect the address on the browser. +1 to @Vitalii Maslianok full WTF !!! - Artem
  • Compiling and building URLs in the address bar is the highest degree of professionalism of a programmer. - Oleg Arkhipov