Demo
![[Code] Tạo icon riêng cho từng box Firesh10](https://i.servimg.com/u/f24/15/64/85/86/firesh10.png)
Cách làm
- Vào index_box- Tìm code sau
Code:
<img title="{catrow.forumrow.L_FORUM_FOLDER_ALT}" src="{catrow.forumrow.FORUM_FOLDER_IMG}" alt="{catrow.forumrow.L_FORUM_FOLDER_ALT}"/>
- Thay bằng
Code:
<img title="{catrow.forumrow.L_FORUM_FOLDER_ALT}" src="{catrow.forumrow.FORUM_FOLDER_IMG}" alt="{catrow.forumrow.L_FORUM_FOLDER_ALT}" value="{catrow.forumrow.FORUM_NAME}" />
- Tiếp tục tìm
Code:
<!-- BEGIN catrow -->
- Chèn dưới nó = code sau
Code:
<script type="text/javascript">
$("[value='Tên box cần thay icon']").replaceWith('<img src="link ảnh thay thế">');
</script>
- Với mỗi box cần thay ta sẽ thêm 1 đoạn code sau
Code:
$("[value='Tên box cần thay icon']").replaceWith('<img src="link ảnh thay thế">');
Lưu ý : Kích thước icon thay thế phải bằng kích thước của icon mặc định . Nếu không icon sẽ nhỏ hoặc lớn làm vỡ khung |