disable-link

I cannot disable link on non-zero date

混江龙づ霸主 提交于 2019-12-24 05:25:07
问题 <tr bgcolor="<?php echo $rowColor ?>" > <td><font face="Arial, Helvetica, sans-serif"><?php echo $f4; ?></font></td> <td><font face="Arial, Helvetica, sans-serif"><?php echo $f5; ?></font></td> <td><font face="Arial, Helvetica, sans-serif"><?php echo $f3; ?></font></td> <td><font face="Arial, Helvetica, sans-serif"><?php echo $deliv_date; ?></font></td> </tr> <?php $i++; } mysql_close(); ?> <tr bgcolor="<?php echo $rowColor ?>" > <td> <strong>Total:</strong> </td> <td colspan="1"> </td> <td >

Find all link in a div element and disable them all

空扰寡人 提交于 2019-12-04 21:27:20
问题 Assume that I have some HTML elements like these : <div id="content_div"> <span><a href="some_link">Click me</a></span> <div> Hello everybody. Click <a href="some_link_else">me</a> to do something else</div> <a href="3rd_link"> Oops </a> </div> All that I need is get all "a" tags in the #content_div and disable all of them (I don't want user to click on them). How could I do that in Jquery? 回答1: Try this: $("#content_div a").click(function(e) { e.preventDefault(); }); 回答2: I would rely less

Find all link in a div element and disable them all

馋奶兔 提交于 2019-12-03 12:47:24
Assume that I have some HTML elements like these : <div id="content_div"> <span><a href="some_link">Click me</a></span> <div> Hello everybody. Click <a href="some_link_else">me</a> to do something else</div> <a href="3rd_link"> Oops </a> </div> All that I need is get all "a" tags in the #content_div and disable all of them (I don't want user to click on them). How could I do that in Jquery? Try this: $("#content_div a").click(function(e) { e.preventDefault(); }); I would rely less on jQuery as it might be disabled by the user, so if you want a CSS solution, you can do it like #content_div {

Disable future dates in jQuery UI Datepicker

戏子无情 提交于 2019-11-27 11:04:52
Is it possible to disable future date from today? Let say today is 23/10/2010, so 24/10/2010 onwards are disabled. Sorry I am very new in jQuery and JavaScript. Cyril Gupta Yes, indeed. The datepicker has the maxdate property that you can set when you initialize it. Here's the codez $("#datepicker").datepicker({ maxDate: new Date, minDate: new Date(2007, 6, 12) }); $(function() { $("#datepicker").datepicker({ maxDate: '0'}); }); JAY Code for Future Date only with disable today's date. var d = new Date(); $("#delivdate").datepicker({ showOn: "button", buttonImage: base_url+"images/cal.png",

Disable future dates in jQuery UI Datepicker

徘徊边缘 提交于 2019-11-27 04:02:35
问题 Is it possible to disable future date from today? Let say today is 23/10/2010, so 24/10/2010 onwards are disabled. Sorry I am very new in jQuery and JavaScript. 回答1: Yes, indeed. The datepicker has the maxdate property that you can set when you initialize it. Here's the codez $("#datepicker").datepicker({ maxDate: new Date, minDate: new Date(2007, 6, 12) }); 回答2: $(function() { $("#datepicker").datepicker({ maxDate: '0'}); }); 回答3: Try This: $('#datepicker').datepicker({ endDate: new Date() }

disable a hyperlink using jQuery

萝らか妹 提交于 2019-11-27 00:36:18
<a href="gohere.aspx" class="my-link">Click me</a> I did $('.my-link').attr('disabled', true); but it didn't work Is there an easy way to disable the hyperlink using jquery? Remove href? I would rather not fiddle with href. So if I can do it w/o removing href, that would be great. David Tang You can bind a click handler that returns false: $('.my-link').click(function () {return false;}); To re-enable it again, unbind the handler: $('.my-link').unbind('click'); Note that disabled doesn't work because it is designed for form inputs only. jQuery has anticipated this already, providing a shortcut

disable a hyperlink using jQuery

孤街醉人 提交于 2019-11-26 12:24:45
问题 <a href=\"gohere.aspx\" class=\"my-link\">Click me</a> I did $(\'.my-link\').attr(\'disabled\', true); but it didn\'t work Is there an easy way to disable the hyperlink using jquery? Remove href? I would rather not fiddle with href. So if I can do it w/o removing href, that would be great. 回答1: You can bind a click handler that returns false: $('.my-link').click(function () {return false;}); To re-enable it again, unbind the handler: $('.my-link').unbind('click'); Note that disabled doesn't