Add tooltips for ng-tagsinput - tooltip

I have been using ng-tagsinput from benford -> http://mbenford.github.io/ngTagsInput/
I am trying to add tooltips for tags added in input field. This tooltip should show contents of the tag. Can anyone help me to add tooltips for the tag?
Any help is appreciated.
Thank you,

I have made little changes in latest file of ng-tags-input.js and ng-tags-input.min.js that will solve your requirement of tool tip.
I have added ng-attr-title={{$getDisplayText()}} at ngTagsInput/tag-item.html template section in js file. by simply adding title attribute to the span tag will work. This change made for you, but #mbenford the creator of this library may add this as an feature.
You can download the file from below links. and you can see the tooltip on tags :)
https://ufile.io/k5v8w - min js
https://ufile.io/sntbh - unminified js

This is a very old question but a template approach is better. Just use the "template" attribute and add tooltip to your template. Details here:
http://mbenford.github.io/ngTagsInput/documentation/guides/custom-templates

Related

Show head only for first page in jspdf-autotable 3.1.1

I am using jspdf-autotable for generating pdf report. I want the header text will only be shown for the first page but not working when setting this option showHead: 'firstPage'
For example: Here is a jsfiddle
Can anyone help me?
The showHead option is for the table header and will not affect the hooks. If you want to have the same behavior for the hooks you can check the data parameter data.pageNumber and conditionally draw your content base on it.

extend rich:select / h:select to have multiple selections

Is it possible to extend rich:select or h:selectOneMenu to enable multiple selection? I am looking for a jsf component which looks like the jQuery Chosen plugin.
The component should let me select multiple options from the drop down.
Please note that I can not use h:selectManyMenu or list box because of the specific requirement.
Note: just saw the tags field below the description box while posting a question. I am looking exactly for the same functionality, except that I want a JSF component, not a js plugin.
Any suggestion is highly appreciated. Thanks in advance.
I would use that jQuery Chosen plugin and do something like this:
use jQuery to apply it to your select
use jQuery to get the selected data
pass the data to the backing bean via a hidden input field
There may be 'pure JSF' ways but it looks like more work. If you find something interesting let me know.

WMD + Rails: how to?

I was looking at http://wmd-editor.com/ but couldn't figure out how to use this in rails. I am pretty new. If someone can lead me to the right direction that would be very appreiciated. Thanks!
You shouldn't do much.
Just make a form with a <textarea> for the attribute you want to edit with WMD, include wmd.js like this javascript_include_tag wmd.js
Taken from WMD readme.txt:
By default, WMD will turn the first
textarea on your page into an editor.
You can modify this behavior with the
wmd-ignore class, described below.

Should jQueryUI apply styles automatically

I've created a theme and applied it to my ASP.NET MVC site. However, the elements on the page aren't picking up the styles automatically. If I do the following for a specific element they get applied appropriately:
$("input[type=button]").button();
$("input[type=submit]").button();
Am I right in thinking I need to do this for all the different elements? Perhaps incorrectly, I assumed this would be done automatically by referencing the css and custom js files?
Thanks
you can write :submit instead of input[type=submit], but I know that's no the answer of your question.
The jQuery UI library only provides code to style your website, but it doesn't do it automatically. So what you need to do is something like this:
$(":submit, :button, :reset").button();
But sometimes you want to use icons or something like this, then you can use
$("#specificButton").button("option", "...", "...");
I hope it helps!

jQuery Editable / Sortable List

I am looking for a jQuery list that is editable (add, change, delete elements), what is a good starting point code base that does this?
I found this one example which is great, but it doesn't add, edit or delete list items:
http://jqueryui.com/demos/sortable/default.html
you would use that jQuery library along side some small plugins, there not that hard to extend if you understand the Dom and jQuery.
take a look at this plug-in for example.
http://www.appelsiini.net/projects/jeditable/default.html

Resources