将不同的属性设置为工具提示

时间:2018-03-06 05:51:21

标签: css tooltip

我正在为工具提示提供不同的设置。它不起作用。



    .hi .tooltip-inner {
        background: #00f;
    }

    <div class="hi">
        <a class="tooltips" data-placement="bottom" data-container="body" data-original-title="Hi there" href="#">Hi there</a>
    </div>
        <div class="hello">
        <a class="tooltips" data-placement="bottom" data-container="body" data-original-title="Hello" href="#">Hello</a>
    </div>
&#13;
&#13;
&#13;

我正在设置&#39; hi那里&#39;蓝色,但没有工作。怎么了?

1 个答案:

答案 0 :(得分:1)

你可以试试这个

&#13;
&#13;
try {
    cursor = db.getUnsyncedLatLngs(engIdForDB);
    if (cursor.moveToFirst()) {
        do {
          //calling the method to save the unsynced name to MySQL
          saveLatLngs(cursor.getInt(cursor.getColumnIndex(NewDatabaseForInRideData.COLUMN_ID)), cursor.getDouble(cursor.getColumnIndex(NewDatabaseForInRideData.Latitude)), cursor.getDouble(cursor.getColumnIndex(NewDatabaseForInRideData.Longitude)), engIdForDB);
         } while (cursor.moveToNext());
     }
} catch (Exception e) {
    e.printStackTrace();
}

//Problem driverEndRideAsync is called even if some LatLng skiped to upload.
driverEndRideAsync(activity, abc, abc, 0, abc);
&#13;
private void saveLatLngs(final int id, final double lati, final double longi, String engId) {

    RestClient.getApiService().update_data(abc, abc, lati, longi, String.valueOf(123), String.valueOf(123), String.valueOf(123), new Callback<String>() {
        @Override
        public void success(String s, Response response) {
            try {
                JSONObject jObj;

                jObj = new JSONObject(s);
                int flag = jObj.getInt("flag");
                if (ApiResponseFlags.SOMETHING_WENT_WRONG.getOrdinal() == flag) {
                    db.updateNameStatus(id, NAME_NOT_SYNCED_WITH_SERVER, engId);

                } else {
                    db.updateNameStatus(id, NAME_SYNCED_WITH_SERVER, engId);

                }
            } catch (JSONException e) {
                e.printStackTrace();
            }

            android.util.Log.i("update_in_ride_data", " Success =" + response);
        }

        @Override
        public void failure(RetrofitError error) {
            android.util.Log.i("update_in_ride_data", " Error =" + error);
        }
    });
}
&#13;
$(document).ready(function(){
    $('[data-toggle="tooltip"]').tooltip();   
});
&#13;
&#13;
&#13;