Welcome Guest [Log In] [Register]
Search Members Calendar | Rules ZB Code Index IF Code Index
ZBCode
  • Navigation
  • ZBCode
  • Coding Resources
  • Code Requests
  • Completed Requests
  • [Completed] [ZB] Quick Easy Code
Hey, welcome to ZBCode, the premier coding forum for ZB. Here you fill find some of the best Invisionfree and Zetaboards Codes on the network! Unfortunately, you're sorta hovering around in guest mode at the moment; why not join in on the fun? Register an account and you can start accessing the wealth of resources we have available here. Enjoy your stay at ZBCode, and remember to tell all your friends about us; the more members, the more codes available. ;)

Interested in joining? Click here.


If you are already a member of ZBCode, feel free to login right here:

Username:   Password:
Locked Topic
[Completed] [ZB] Quick Easy Code
Tweet Topic Started: Oct 15 2009, 04:51 AM (275 Views)
Flavius Oct 15 2009, 04:51 AM Post #1
Member Avatar


Posts:
283
Group:
Member
Member
#360
Joined:
Jul 29, 2008
Coding language
HTML/CSS
I need a code that does the following.

If .trow2 contains <a href="member.php?action=profile&uid=8"><img src="./uploads/avatars/avatar_8.png" alt="" width="100" height="100" /></a> then .trow2 has border-right & bottom = 0.

What I need is, if the .trow2 contains that stuff therem, the the .trow2 which contains that has a border right and bottom equal to 0 (no right and bottom border).

The red stuff should be changed to work for any number no matter what number it is.
Posted Image
Offline Profile Goto Top
 
Choco Oct 15 2009, 05:38 AM Post #2
Member Avatar
¡ʎɹoʇɔɐɟ ʎʇıʌɐɹƃ ɐ uı pǝddɐɹʇ ɯ,ı 'dןǝɥ

Posts:
589
Group:
Admins
Member
#3,272
Joined:
Jun 30, 2009
Coding language
Everything
Code:
 
<script type="text/javascript">$(function(){$('.trow2:contains(<a href="member.php?action=profile&uid=8"><img src="./uploads/avatars/avatar_8.png" alt="" width="100" height="100" /></a>)').css('borderRightWidth','0px').css('bottom','0px');});</script>

Try that. :)
Posted ImageIt's a magical world, Hobbes, ol'd buddy... ...let's go exploring!
In progress: Something Special ;)
Offline Profile Goto Top
 
Flavius Oct 24 2009, 01:55 AM Post #3
Member Avatar


Posts:
283
Group:
Member
Member
#360
Joined:
Jul 29, 2008
Coding language
HTML/CSS
Problem as, you have the 8. I want it to work for all numbers without repeating the code.
Posted Image
Offline Profile Goto Top
 
RedBldSandman Oct 24 2009, 07:03 PM Post #4
Member Avatar
ZIPPY!

Posts:
482
Group:
Coding Staff
Member
#2,122
Joined:
Jan 25, 2009
Try this:
Code:
 
$(function(){
var trow2Reg = /<a href="member\.php\?action=profile&uid=\d+"><img src="\.\/uploads\/avatars\/avatar_\d+\.png" alt="" width="100" height="100" \/><\/a>/gi;
$(".trow2").each(function() {
if ($(this).html().match(trow2Reg)) {
$(this).css("borderRightWidth","0px").css("borderBottomWidth","0px");
}
});
});
This removes both the bottom and right borders, I think that's what you wanted xD

EDIT: Updated the Regular Expression thanks to Reid :D
Edited by RedBldSandman, Oct 24 2009, 08:26 PM.
Posted Image
"To iterate is human, to recurse divine."

Offline Profile Goto Top
 
Vitality Nov 19 2009, 03:11 PM Post #5
Member Avatar
Tabula Rasa

Posts:
784
Group:
Former Staff
Member
#320
Joined:
Jul 26, 2008
Request Complete.

Your request has been completed, but you have not replied in a while to tell us whether it is working out for you or not. Your topic will be moved to the correct forum. We hope it works for you; if it doesn't, feel free to post another request topic in the requests forum. Just remember: read the rules first!

Thanks,
The ZBCode Staff
Offline Profile Goto Top
 
1 user reading this topic (1 Guest and 0 Anonymous)
« Previous Topic · Completed Requests · Next Topic »
Locked Topic

Track Topic · E-mail Topic Time: 2:26 PM Jul 11
Hosted for free by ZetaBoards · Privacy Policy