Posts

Showing posts from March, 2022

Deploy Angular Project with CI /CD to Hostinger with FTP

 1. creat a folder in your project root folder with name .github 2. create second folder in .github/workflows 3. create file in your .github/workflows/main.yml paste this code in main.yml file on :   push :     branches : main <--- select your branch name name : 🚀 Deploy website on push jobs :   web-deploy :     name : 🎉 Deploy     runs-on : ubuntu-latest     steps :     - name : 🚚 Get latest code       uses : actions/checkout@v3     - name : Use Node.js 18       uses : actions/setup-node@v2       with :         node-version : '18'           - name : 🔨 Build Project       run : |         npm install               npm run build       - name : 📂 Sync files       uses : SamKirkland/FTP-Deploy-Action@v4.3.4   ...

java script get value from tag

<ul id="navMenus" class="booking-dates" data-bind="foreach: bookingDates">         <li><span data-bind="text: bdate, click: $parent.addDate">02 Apr</span></li>     </ul>  <script type="text/javascript" src="https://code.jquery.com/jquery-1.12.4.js"></script> <script type="text/javascript">   $("#navMenus").on('click','li',function(){      $("#navMenus li.active").removeClass("active");  // this line for remove color when I click on  button.          var k = $(this).text();  // this line for gettting value when I click on  button       // alert(k);     $(this).addClass("active");  // this line for remove button onclick }); </script>

On click Button , and get data in modal form

 <button class="buy" data-id="<?=$cart_value->id?>" type="button" style="background-color: #f55345; color: white; padding-right: 25px; padding-left: 25px; border:2px solid #f55345;" data-toggle="modal" data-target="#myModal">Buy Now</button> Explainatin  :   make  a class in a button tag , thats like mention above you  see .   ok . </script> $(' .buy ').on('click',function(){                                var k = $(this).data(' id ');                    $("# productid ").val(k);                              });  </script> explaination:  about  ->>>    var k =  $(this).data(' id '); Answer -->>> buy  is  our class name , $(this).data(' ')    <----...

Autometic reload page in codeigniter

 <?php header("<?=base_url()?>home/contact_send_mail", true, 302);?> 1. which your are menstion in this <" "> .home is a controller  and contact_send_mail  is  a method  which is defined in home controller in codeigniter . 2 .  Simply copy  that code and paste in contact_send_mail  page . then your page will be refresh autometic when you  on the  contact_send_mail. that's all .

Popular posts from this blog

Ms Office 2019 activation link