Reputation: 148
I have a string like
$string = '<img class="img-responsive animate scale animated" src="image/catalog/blocks/about-banner.jpg" alt="">';
I want to remove img-responsive
class from it. How?
Upvotes: 0
Views: 513
Reputation: 642
In Php, You can use str_replace
function as below:
$string = '<img class="img-responsive animate scale animated" src="image/catalog/blocks/about-banner.jpg" alt="">';
$new_string = str_replace('img-responsive', '' , $string);
Additionally, in Jquery, do like below:
$('.animate').removeClass('img-responsive');
Upvotes: 1
Reputation: 76
You can find all functions about replace on php : http://php.net/manual/en/function.str-replace.php
Upvotes: 0
Reputation: 231
Hey u can just add below code in script:
<script>
$(document).ready(function(){
$('.animate').removeClass('img-responsive');
});
</script>
Upvotes: -1
Reputation: 2694
Try this: $string = str_replace('img-responsive', '', $string);
Upvotes: 2