would like some help replacing a part of a string using jquery, so here is what i have:
http://www.test.com/santa-cruz-island/?iframe=true&width=60%&height=70%
i would like to replace all the content from ?iframe= up to the end:
up to now i have this:
jQuery('.islands_info_ggt').each(function() {
url = jQuery(this).attr('href');
_imgr = url.replace('iframe=', 'test');
jQuery(this).attr('href', _imgr)
});
Result: http://www.test.com/santa-cruz-island/?testtrue&width=60%&height=70%
This is the result im looking for: http://www.test.com/santa-cruz-island/?test