Created
February 23, 2009 16:18
-
-
Save queso/69027 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$('select#limit_amount').change(function() { | |
var limit = $('select#limit_amount option:selected').text(); | |
var new_script = $('#widget_text').val().replace(/.js(\?limit=[0-9]+)*\"\>/, '.js?limit='+ limit +'\"\>'); | |
$('#widget_text').val(new_script); | |
var link = $('#widget_text').val().match(/src=\"(.*)\"\>/)[1] | |
$.getScript(link); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment