약간의 문제가 있습니다 - H1 요소의 이미지에 "K"및 "k"문자를 대체하고 싶습니다.Jquery의 이미지로 여러 문자 바꾸기
나는 이것을 시도하고 그것은 하나 개의 문자를 꽤 좋은 작동합니다
$(function() {
$("h1").each(function() {
if($(this).children().length==0) {
$(this).html($(this).text().replace('K', '<img src="http://www.fotograf-in-frankfurt.biz/img/v2013/k_cap.png" style="display:inline-block;" alt="K">'));
}
});
});
이 하나가 자본 "K"를 꽤 잘 작동했지만 지금은 allso가 하나 아래를 교체 할 - 그래서 노력이 : 결과는 마침내 약간의 소름 끼치는 모습
$(function() {
$("h1").each(function() {
if($(this).children().length==0) {
$(this).html($(this).text().replace('K', '<img src="http://www.fotograf-in-frankfurt.biz/img/v2013/k_cap.png" style="display:inline-block;" alt="K">').replace('k', '<img src="http://www.fotograf-in-frankfurt.biz/img/v2013/k_low.png" style="display:inline-block;" alt="k">'));
}
});
});
-이 같은 : 인라인 B : 디스플레이
furt.biz/img/v2013/k_cap.png "= 스타일" 내가이 만든 확신
연락처 기술 & Terminvereinbarung
: "ALT ="K "> & ontakt Terminvereinbarung
을하지만 더 대체 문자를 다음과 같이한다 잠금 실수는 어쩌면 바보 같은 짓일지도 모르지만 어디서?
도움을 주셔서 감사합니다.
고마워요! 그것은 나를 위해 꽤 잘 작동했습니다! – aklein