Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Hi,
i have this code that doesn't work in umbraco:
<script language="javascript" type="text/javascript"> $(window).load(function changeSize() { var cond = '../umbraco/images/'; var iMg = document.getElementsByTagName('img'); for (var i = 0; i < iMg.length; ++i) { if (iMg[i].src.match(cond)) { iMg[i].style.width = '252px'; iMg[i].style.height = '147px'; } } });
</script>
why not work?
Thanks for the answer.
Hi Nelson
Technically your query is not related to Umbraco, it is a JavaScript / jQuery problem.
However what would be useful is it you could post a excerpt of your resulting html output to see what you are trying to "match" against.
Cheers, Nigel
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.
Continue discussion
Problem with javascript code
Hi,
i have this code that doesn't work in umbraco:
<script language="javascript" type="text/javascript">
$(window).load(function changeSize() {
var cond = '../umbraco/images/';
var iMg = document.getElementsByTagName('img');
for (var i = 0; i < iMg.length; ++i) {
if (iMg[i].src.match(cond)) {
iMg[i].style.width = '252px'; iMg[i].style.height = '147px';
}
}
});
</script>
why not work?
Thanks for the answer.
Hi Nelson
Technically your query is not related to Umbraco, it is a JavaScript / jQuery problem.
However what would be useful is it you could post a excerpt of your resulting html output to see what you are trying to "match" against.
Cheers, Nigel
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.