Skip to content

Commit

Permalink
make regex negligibly faster
Browse files Browse the repository at this point in the history
  • Loading branch information
elidupuis committed Oct 25, 2011
1 parent effbffb commit c56fe3e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion jquery.modal.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@
function open_modal_from_link(event) {
event.preventDefault();
var target = $(this).attr('href');
if(target.match(/^#/)) { // DOM id
if(/^#/.test(target)) { // DOM id
$(target).modal();
} else { // AJAX
$.get(target, {}, function(html) {
Expand Down

0 comments on commit c56fe3e

Please # to comment.