2016-04-28 7 views

Antwort

2

Sie am Anfang Ihres Skripts tun könnte:

// You can retrieve the id in 'matches' variable if needed 
if (matches = window.location.href.match(/#delete-([0-9])+/)) 
{ 
    $('#my-modal').modal('show'); 
} 
+0

console.log (window.location.href.match (neu RegExp ('/ # löschen - ([0-9]) +/'))); ist null. –

+0

Funktioniert für mich ohne 'neue RegExp', aktualisiere ich meine Antwort – soywod