Jump to content

ishan_shah

Members
  • Posts

    90
  • Joined

  • Last visited

Posts posted by ishan_shah

  1. Hi @vitalnet,
    I have tried to code as per your requirement. Kindly check the same. Hope it will work for you.
     

    <html lang="en">
    <head>
        <title>Bootstrap 4 Tooltip Persists, Looks Terrible</title>
        <meta charset="utf-8">
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <meta http-equiv="Content-Type" content="text/html">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css">
        <script src="https://code.jquery.com/jquery-3.3.1.slim.min.js"></script>
        <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js"></script>
        <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js"></script>
    </head>
    <body>
        <div class="container">
            <h3>Bootstrap 4 Tooltip Persists, Looks Terrible</h3>
            <br> "Other button disabled" scenario works fine.
            <br> First, hover over buttons. Look at tooltips while hovering.
            <br> Then, click button A to disable button B. Works fine:
            <br> - Button B is disabled, and no tooltip.
            <br> - Tooltip still works correctly on button A.
            <br> <br>
            <button type="button" id="button_a" class="btn btn-primary" data-toggle="tooltip" data-trigger="hover"
                title="Disables Button B" onclick='change_button ("button_b", true);'>
                Button A
            </button>
            <button type="button" id="button_b" class="btn btn-primary" data-toggle="tooltip" data-trigger="hover"
                title="Disabled by Button A">
                Button B
            </button>
            <br> <br>
            <hr>
            <br> "Same button disabled" scenario fails.
            <br> First, hover over Button C. Look at the tooltip.
            <br> Then, click button C to disable button C. Messes up:
            <br> - Button C is disabled, so that part is OK.
            <br> - But Button C tooltip persists, looks terrible.
            <br> <br>
            <button type="button" id="button_c" class="btn btn-primary" data-toggle="tooltip" data-trigger="hover"
                title="Disables Button C" onclick='change_button ("button_c", true);'>
                Button C
            </button>
            <button type="button" id="button_d" class="btn btn-primary" data-toggle="tooltip" data-trigger="hover"
                title="Enables Button C" onclick='change_button ("button_c", false);'>
                Button D
            </button>
            <br> <br>
            <hr> <br>
            So if a button is disabled while the cursor is hovering over it, the tooltip persists.
            <strong>
                Could you please explain how to make tooltip go away when Button C is disabled?
            </strong>
            I would prefer if tooltip went away when Button C disabled,
            since that is default behavior of bootstrap disabled buttons.
            And disabled button may later get enabled again, so I do not want to delete title attribute.
            Basically I want bootstrap to behave the same way as when Button B is disabled.
            I have looked around and cannot find how to fix this problem,
            and have tried various things, with no success.
            There are real instances where a button carries out an action,
            and then the button needs to be disabled, so I appreciate the help. Thanks
        </div>
        <script>
            $(document).ready(function () { $('[data-toggle="tooltip"]').tooltip(); });
            function change_button(button_id, bool_val) {
                if (button_id === 'button_c') {
                    $('[data-toggle="tooltip"]').tooltip('hide');
                }
                var button_obj = document.getElementById(button_id);
                button_obj.disabled = bool_val;
            }
        </script>
    </body>
    </html>

     

  2. Hello @smus,
    Simply you can use the element name separated by a comma as a selector in CSS. Following is the example of multiple tags as a single selector.

    E.x.
    h1, h2, h3 {
            color:orange;
    }

  3. Hi @ughhope,
    I have tried to code as per your requirement. I think you should try this once.
     

    <!DOCTYPE html>
    <html>
    <head>
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <style>
            .container {
                position: relative;
                width: 50%;
            }
    
            .image {
                display: block;
                width: 100%;
                height: auto;
            }
    
            .overlay {
                position: absolute;
                top: 0;
                bottom: 0;
                left: 0;
                right: 0;
                height: 100%;
                width: 100%;
                opacity: 0;
                transition: .5s ease;
                background-color: #008CBA;
            }
    
            .container:hover .overlay {
                opacity: 1;
            }
    
            .text {
                color: white;
                font-size: 20px;
                position: absolute;
                top: 50%;
                left: 50%;
                -webkit-transform: translate(-50%, -50%);
                -ms-transform: translate(-50%, -50%);
                transform: translate(-50%, -50%);
                text-align: center;
            }
        </style>
    </head>
    <body>
        <h2>Fade in Overlay</h2>
        <p>Hover over the image to see the effect.</p>
        <div class="container">
            <img src="https://www.roadtestreviews.com/wp-content/uploads/2014/11/mustang-batcave-017.jpg" alt="Avatar"
                class="image">
            <a href="https://www.google.com/" class="overlay"></a>
        </div>
    </body>
    </html>

    I hope it will work as per your requirements.  I have also added an anchor tag for your second query.

  4. Hello,
    I have tried the following query. I hope it will work for you also.

    select * from [table_name ]where SUBSTRING(col_name,len(col_name),len(col_name)) in ('a','e','i','o','u');

    Or in case of case sensitivity, you should try following query.

    select * from TABLE_NAME where SUBSTRING(COL_NAME,len(COL_NAME),len(COL_NAME)) in ('a','e','i','o','u','A','E','I','O','U')

    I have tried other one query also. It is as follows:
     

    select * from TABLE_NAME where (RTRIM(COL_NAME)) like '%a' or (RTRIM(COL_NAME)) like '%e' or (RTRIM(COL_NAME)) like '%i' or (RTRIM(COL_NAME)) like '%o' or (RTRIM(COL_NAME)) like '%u'

     

  5. Hello,
    You can give multiple styles using semicolons(;) to a single element. Following is the example of the same as an inline CSS.
     

    <h1 style="color:blue; text-align:center"> Your Text </h1>

    In case you want to apply internal CSS then your code will be as follows:
     

    <h1 id="header1">Your Text</h1>
    
    #header1 {
      color:blue;
      text-align:center
    }

     

  6. Hello,
    You should use cellspacing attribute of the table element for spacing between two columns of the table. Following is the example code of the same.
     

    <table cellspacing="10">
      <tr>
        <th>Month</th>
        <th>Savings</th>
      </tr>
      <tr>
        <td>January</td>
        <td>100</td>
      </tr>
    </table>


     

  7. Hello,
    You should try following code.

    <html>
    <head>
      <meta charset="utf-8">
      <meta name="viewport" content="width=device-width, initial-scale=1.0">
      <title>Masterclass Of Indigo | Udstillinger</title>    
      <link href="../main.css" rel="stylesheet" type="text/css">
      <link href="../footer.css" rel="stylesheet" type="text/css">
      <link href="../tablet768.css" rel="stylesheet" type="text/css">
      <link href="../mobile400.css" rel="stylesheet" type="text/css">
      <!-- Font 5 icons -->
      <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.7.0/css/all.css" integrity="sha384-lZN37f5QGtY3VHgisS14W3ExzMWZxybE1SJSEsQp9S+oqd12jhcu+A56Ebc1zFSJ" crossorigin="anonymous">
        
      <style type="text/css">
            .rosenfeldt-box {
                height: 200px;
                background-color: #FF00D7;
                background-image: url("2017RosenfeldtMenu.JPG");
                background-size: cover;
                margin: 1%;
            }
          
            .kulturnat-box {
            height: 200px;
            background-color: #FF00D7;
            background-image: url("2018KulturnatMenu.jpg");
            background-size: cover;
            margin: 1%;
            }
      </style>  
       
    </head>

    <body>
        <span>&nbsp;<a href="http://masterclassofindigo.art"><i class="fas fa-home" style="font-size:36px;color:white"></i> </a></span><a href="http://masterclassofindigo.art" style="
        color: white;">
        <span> <overskrift>&nbsp; Udstillinger</overskrift> </span>

         <hr>
        </a><main><a href="http://masterclassofindigo.art">
            <span>
                </span></a><div class="rosenfeldt-box"><a href="http://masterclassofindigo.art">
                    </a><h2><a href="http://masterclassofindigo.art">
                        </a><a href="2017Rosenfeldt.html">Rosenfeldt 2017</a>
                    </h2>
                </div>     
         <span>   
            <div class="kulturnat-box">
                <h2>
                    <a href="2018Kulturnat.html">Kulturnat Vordingborg 2018</a>
                </h2>
            </div>
         </span>
       </main>
        <hr>
        <footer>
            <p class="footerDisclaimer">2019  Copyrights - <span>All Rights Reserved - </span>MasterclasOfIndigo.art</p>
            <p class="footerNote">Cookiefri hjemmeside | No Cookies</p>
        </footer>


    </body></html>

  8. Hello,
    JavaScript can be used to change the HTML content as well as mostly used for the validations of the input types. you can apply JavaScript in two ways. Either internal or externally.
    When you write your JS code in between <script>, then it is called Internal JavaScript.
    E.x.

    <script> 
    function myFunction() {
     document.getElementById("demo").innerHTML = "Paragraph changed.";
    }
    </script>


    When you write your JS code in a separate file and then give its path to src attribute in <script>, then it is called External JavaScript.
    E.x.
    Your Js File:
     

    function myFunction() {
     document.getElementById("demo").innerHTML = "Paragraph changed.";
    }
    <script src="script.js"></script>

     

  9. Hello,
    You can simply use the between clause to find the records between the given dates. SQL query can be written as follows:
     

    SELECT * FROM TABLE
    WHERE Failure-Dates IS BETWEEN FROM_DATE AND TO_DATE

     

  10. Hello,
    If you have simple if condition then you can use ternary operator instead of if condition. Syntax is as follows:

    (condition) ? "code if condition is true" : "code if condition is false";


     

  11. If you have only header tags in your HTML than you can use * as an universal selector. Or else you can give names if there are only few tags as you don`t want to give class to the all elements.

  12. Hello,
    You can directly use it as follows:
    Go to YouTube.
    Select Video.
    Click on share button.
    Select embed option.

    Finally you will get a iFrame tag coding for video that you can directly post on your html code

×
×
  • Create New...