Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

andSelf is deprecated in jquery3, changed to addBack #388

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions README.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,9 @@ Check the [examples.html](http://aehlke.github.com/tag-it/examples.html) for sev

First, load [jQuery](http://jquery.com/) (v1.4 or greater), [jQuery UI](http://jqueryui.com/) (v1.8 or greater), and the plugin:

<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.5.2/jquery.min.js" type="text/javascript" charset="utf-8"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.12/jquery-ui.min.js" type="text/javascript" charset="utf-8"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js" type="text/javascript" charset="utf-8"></script>

<script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.12.1/jquery-ui.min.js" type="text/javascript" charset="utf-8"></script>
<script src="js/tag-it.js" type="text/javascript" charset="utf-8"></script>

If you're using a custom jQuery UI build, it must contain the Core, Widget, Position, and Autocomplete components. The Effects Core with "Blind" and "Highlight" Effect components are optional, but used if available.
Expand Down Expand Up @@ -293,4 +294,3 @@ The `<input>` field which is used for entering new tags. It's a jQuery object, s
## License

tag-it is released under the [MIT license](http://github.com/aehlke/tag-it/raw/master/LICENSE).

23 changes: 11 additions & 12 deletions examples.html
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@

<!-- jQuery and jQuery UI are required dependencies. -->
<!-- Although we use jQuery 1.4 here, it's tested with the latest too (1.8.3 as of writing this.) -->
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js" type="text/javascript" charset="utf-8"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.9.2/jquery-ui.min.js" type="text/javascript" charset="utf-8"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js" type="text/javascript" charset="utf-8"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.12.1/jquery-ui.min.js" type="text/javascript" charset="utf-8"></script>

<!-- The real deal -->
<script src="js/tag-it.js" type="text/javascript" charset="utf-8"></script>
Expand All @@ -52,7 +52,7 @@
singleFieldNode: $('#mySingleField')
});

// singleFieldTags2 is an INPUT element, rather than a UL as in the other
// singleFieldTags2 is an INPUT element, rather than a UL as in the other
// examples, so it automatically defaults to singleField.
$('#singleFieldTags2').tagit({
availableTags: sampleTags
Expand Down Expand Up @@ -132,7 +132,7 @@
availableTags: sampleTags,
removeConfirmation: true
});

});
</script>

Expand All @@ -141,15 +141,15 @@

<a href="http://github.com/aehlke/tag-it"><img style="position: absolute; top: 0; right: 0; border: 0;" src="http://s3.amazonaws.com/github/ribbons/forkme_right_white_ffffff.png" alt="Fork me on GitHub" /></a>

<div id="wrapper">
<div id="header">
<h2>Tag-it! Usage Examples</h2>
<div id="wrapper">
<div id="header">
<h2>Tag-it! Usage Examples</h2>

<ul id="nav">
<li><a href="http://aehlke.github.com/tag-it">&laquo; back to widget home</a></li>
</ul>
</div>

<div id="content">
<p>These demo various features of Tag-it. View the source to see how each works.</p>

Expand Down Expand Up @@ -259,15 +259,14 @@ <h3>Remove Confirmation</h3>
</div>


<div id="footer">
<div id="footer">
<div class="left">
<p>Built with <a href="http://jquery.com/" target="_blank">jQuery</a> and <a href="http://jqueryui.com/" target="_blank">jQuery UI</a>.</p>
<p>Originally created by <a href="http://levycarneiro.com/">Levy Carneiro Jr</a>. Currently maintained by <a href="http://github.com/aehlke">Alex Ehlke</a>.</p>
</div>
<p class="right weak">Template adopted from <a href="http://orderedlist.com/demos/fancy-zoom-jquery/">orderedlist.com</a></p>
<br class="clear"/>
</div>
</div>
</div>
</body>
</html>

3 changes: 1 addition & 2 deletions js/tag-it.js
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@
this.options.singleFieldNode = this.element;
this.element.addClass('tagit-hidden-field');
} else {
this.tagList = this.element.find('ul, ol').andSelf().last();
this.tagList = this.element.find('ul, ol').addBack().last();
}

this.tagInput = $('<input type="text" />').addClass('ui-widget-content');
Expand Down Expand Up @@ -588,4 +588,3 @@

});
})(jQuery);

2 changes: 1 addition & 1 deletion js/tag-it.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.