tooltipster.js: title is removed when tooltipstered - tooltipster

Here's another clue:
https://jsfiddle.net/68umt5b3/
Please note, that title of <span> is getting lost after first hovering. How can I preserve it?
Thanks!

There is no option to accomplish that, as otherwise the browser would display a native tooltip on top of Tooltipster's tooltip. Whatever you want to accomplish, do it in another way, for example with some "data-title" attribute.

Related

How can I access a button to click it with following code in selenium webdriver?

There are many buttons sharing the same class.
May have to go with clicking the link /account/logout'.
This is the code I'm trying to use:
input class="btnRed text-uppercase fo_white" value="Logout" onclick="window.location.href='/account/logout';" type="button"
Hard to say because you didn't provide enough info, but you could probably make it work by using value attribute. Something like this if you are using java.
driver.findElement(By.cssSelector("[value='Logout']")).click();
Not pretty solution, but give it a try:
driver.findElement(By.cssSelector(".btnRed.text-uppercase.fo_white")).click();
Looking at your HTML DOM this command will work for you:
driver.findElement(By.xpath("//input[#value='Logout']")).click();
Let me know if it works for you.
Looking at your HTML, this should work
driver.findElement(By.xpath("//input[#value='Logout'][#type='button']")).click();
Let me know if it works.
Is your element visible/enabled? In order to select an element, it must be present in your DOM. If the element is activated through an event, it cannot be selected until the event occurs.
Take a look at this post. This other post also have good ideas.

Materialcss modal not working with datatables.js

I am trying to build an admin dashboard using material design framework. As a part of it, I am trying to add modal-trigger element inside a <td></td> tag of a table that uses datatable.js library. But when I click on the trigger no modal is appearing. Did anyone face similar issue before?
I think that what's happening is that your trigger isn't in the DOM when you draw the table, but without seeing your code I can't be sure. Generally, it will trigger a modal when it is clicked or something? You might want to change the actual triggering to clicking on a td with a given class contained within the table so something like this:
$(".modal-trigger").click(function(){//Open Modal});
This would work on the first page but not after the first draw of the table as the event had been registered before the elements were within the DOM. Rather, you'd need to listen to the click within the table like this:
$("#table-id").on("click", ".modal-trigger", function(){//Open Modal});
I hope that makes sense and that it helps, if not perhaps work up a JSFiddle illustrating your issue?

Is it possible to add bootstrap-tagsinput to textarea?

I'm working on project and I want to add tagsinputs to a textarea. Is it possible somehow ? Thank for helping.
There is not yet any support for this in Textare elements.One way to go is to use the input element for the tags.
See here for reference: https://github.com/TimSchlechter/bootstrap-tagsinput/issues/38
I solved it by removing borders from input and adding border to parent element so it looks like tagsinputs in textarea.

Cytoscape.js, add title to whole complex & right click enable

a) I have a complex of nodes and edges. I want to add a title to the complex. Is there any way in Cytoscape.js, where I can display the title of the complex?
b) Additionally, I want to give user an option to download the complex in png file with a right click option, but my right click on the cytoscape div doesn't work. Is there any way or any flag I need to change to enable my right click on the picture?
Looks like no one is going to answer my question, answering them myself:
So, after struggling with these questions; I have got the solution for my first problem i.e. putting the title. We can have a parent node with the label as your complex title and then display it on the node. Don't think that it is a good way to do it. There should be something in cytoscape.js to display the title as well. But I don't think it is there yet.
In cytoscape there is an option to bind the event on right click, "cxttap" I used that to make a right click event. But I don't know how to give options on that click, working on that..!! If you are looking for same solution, stay tuned ;)
You can use right button with cytoscapejs by modifying the code below, adding your code
cy.on('cxttap', function(e){
console.log("right click!"); // just to check that it works, look at the console
// add here your code...
// ....
})

How to check if element is been dragging with Dojo

What to check if an element is been dragging to make a report of how many times has been dragged, any idea? with dojo of course.
This is the element to be sensed.
<p id="id_number" class="button">Button_name</p>
Please be more clear. I suppose you mean you want to use dojo/dnd/Moveable on your DOM node to make it draggeable? If you look at the API documentation you will notice that it has an event called onDragDetected which will be useful to you. Just increment a counter with it and you're done.