Webmaster Forum

Go Back   Webmaster Forum > Web Development > Coding Forum

Coding Forum Problems with your code? Discuss coding issues, including JavaScript, PHP & MySQL, HTML & CSS, Flash & ActionScript, and more.

Thread Tools Display Modes
Share |
Old 12-18-2016, 10:42 PM
yangyang's Avatar
yangyang yangyang is offline
Contributing Member
Join Date: 08-30-07
Posts: 228
iTrader: 0 / 0%
jQuery closest() remove() on <a> doesn't work?

Please see this page which has this code:

<div class="pure-control-group query-brand-by-column"> <!-- somethings else --> <div class="pure-u-1 pure-u-sm-1-24 control-group-sub"> <a href="javascript:$(this).closest('.query-brand-by-column').remove();" class="pure-button danger">X</a> </div> </div>
Clicking the X link should remove its ancestor div.query-brand-by-column as a whole but somehow it's not working. I've checked jQuery docs and this answer and the code seems absolutely all right to me but it simply doesn't work. Any idea?
Reply With Quote



Old 01-08-2017, 02:42 PM
Roy1985's Avatar
Roy1985 Roy1985 is offline
Contributing Member
Join Date: 01-05-17
Posts: 53
iTrader: 0 / 0%
what happens if you change $(this) to jQuery(this) ? anything in developer console when you click the link?

i checked your website but don't see this code - probably you changed it.

let me know if you find a solution
Reply With Quote
Go Back   Webmaster Forum > Web Development > Coding Forum


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
jquery .html() work around kontrol Coding Forum 1 02-19-2015 11:08 AM
PHP/HTML/CSS/Jquery Web Developer looking for work wmanole Sell Web Services 0 09-15-2013 03:32 AM
jQuery image rotator dosn't work, suddenly stopped marengo Coding Forum 0 03-11-2013 12:42 PM
why do certain jquery files not work with certain scripts OrlandoInsurance Coding Forum 4 06-09-2011 10:43 AM

V7N Network
Get exposure! V7N I Love Photography V7N SEO Blog V7N Directory

All times are GMT -7. The time now is 03:40 PM.
Powered by vBulletin
Copyright 2000-2014 Jelsoft Enterprises Limited.
Copyright © 2003 - 2018 VIX-WomensForum LLC