[jQuery] Re: Link Clicks Double Firing
doh! matt you hit the web accessibility nail right on the head! thanks for reminding me. maybe i should pay penance by turning off my javascript for a day! then again, corporate policy dictates that i have IE6 loaded on my pc, hopefully that buys me some web accessibility karma.
[jQuery] Re: Link Clicks Double Firing
this really an interesting jq/html semantic issue: if the tag is not handling the actual redirection to another page, maybe we shouldn't be using the tag at all. maybe the href should really just be stored in the jq routine. this clears up maintenance issues and passes the gut check.
[jQuery] Re: Link Clicks Double Firing
hi pedalpete, your solution does work perfectly fine, sorry for not making that clear. but if we look beyond the initial implementation we begin to see a problem: this solution requires two separate pieces of code to be maintained to handle certain modifications. for instance, if the link needs to be changed so that it opens in a separate window, both the tag and the jq code need to be modified; and keep in mind these two pieces of code may reside in two different files. many developers will find the first instance (either the or the jquery), change it, and move it back to production and think the problem was completely resolved, then not understand why sometimes users are going to the right page and sometimes they are still going to the old one. so your proposed solution does resolve the issue originally raised, however, there are long term issues with it and i would like to see if there is a better solution that does not introduce the maintenance problem stated above. i appreciate your feedback and hope that i've made my point, however inelegant, a little clearer! On Jan 13, 6:38 pm, pedalpete wrote: > Hi Bill, > > I'm still learning lots, and was hoping you could better explain what > was wrong with my solution (as it seems the other solutions are FAR > more complicated. > > What I was trying to acheive was to just disable the link for > javascript enabled browser, and keep it enabled for those without > javascript. > > As the link is inside the cell, and the javascript action is triggered > on any click within the cell, I believe my recommendation should work > well in all instances. > > I believe with .unbind('click'), the click on a link will not be > interpreted at all, and that the JS will always take the action. > > I may be misunderstanding what is happening under the covers, but what > I recommend does not unbind after a click, it would unbind the clicks > at load time if I've got it right.
[jQuery] Re: Link Clicks Double Firing
ack, i just realized i misread pedalpete's solution; each click will only get interpreted once, but depending on where the click happens determines whether or not the tag or the js will handle it. this smacks of wrongness. let's examine other ways to handle this: 1. expand the size of the to completely fill the , which is not a good solution if this requires placing a block element in an inline element 2. leave out the tag completely, putting your link in the title of an existing element, which is semantically poor and may negatively impact accessibility 3. just hide the tag, so it cannot be clicked on, which just doesnt seem palpable. h. 4. remove the tag from the dom once the link is extracted, which seems a bit like the unnecessary kidney operation i had has a youth 5. remove the 'href' from the tag once the link is extracted, not as invasive as #4 but still questionable i'd vote for #3 but don't really like any of these approaches. can anyone come up with a "correct" solution that will allow us all to sleep better at night???
[jQuery] Re: Link Clicks Double Firing
change window.open to window.location both the anchor tag and the javascript are interpreting the click, and the problem is that your anchor tag is opening the link in the same window, whereas your js was opening the link in a new window. actually, pedalpete's solution is more correct (as there is now only one item interpreting the click), and should be followed.
[jQuery] treeview
I am using the treeview plugin (with the famfamfam theme) as a navigation tool, does anyone know how to stop a node which is a link, that also has child nodes from collapsing/expanding when the actual link is clicked? Basically, I want the tree to only collapse/expand when the "plus"/"minus" (hitarea) images are pressed? Thanks.
[jQuery] Re: Converting a javascript to jQuery
modestmj, can you provide some background as to why you want to convert working javascript to jquery? your reasons may (or may not be) relevant to a solution. either way, i am curious. thank you.
[jQuery] Re: tabs in one line, on small resolution
just set the width of the containing div, not the min-width, as that is all that is required to prevent the collapsing and is supported by almost every browser available, including good ole IE6. @Greg to stop supporting IE6 means stop supporting the people who use IE6. many businesses rightly feel an obligation to support their customers, regardless of their financial state and/or technical acumen. it would make my life easier to disregard all but the most compliant browsers, but, sadly, making my life easier is not what my job is about. : ) On Jan 13, 8:50 am, Greg Tarnoff wrote: > Another option is using the CSS min-width to set a minimum width in > case they make the window smaller, this will prevent the block from > wrapping.. this will mean two things: > 1) Side scrolling in 800x600, but let's be real you shouldn't have > to support that these days anyway. > 2) Min-width doesn't work in IE6,7 and I don't think 8. But > again...we, as a community need to stop supporting IE6. > > Gregory Tarnoff > > www.tarnoff.infohttp://www.twitter.com/gregtarnoffhttp://www.flickr.com/photos/urothane
[jQuery] Re: show/hide
the jquery: $(function() { $('.sectionTitle').click(function() { $('.sectionBody').hide("slow"); $(this).next("div").show("slow"); }); }); the clickable parts: it is unclear what you want the visitors to click on to hide/show your sections, so i created anelement and gave it a class of .sectionBody for the task. you can certainly use whatever you like. the content: i wrapped the content following the