First off... there are no dumb questions :) Glad you got it sorted. But would it maybe be a little more efficient to do:
if (href !="") { $('#content').html($(href).html()); } since you're not doing anything on the other condition (href being blank), no need for the 'else'? I realize you said this is only a snippet so maybe there's a reason for doing it the other way. If not, food for thought :) On Wed, Jun 24, 2009 at 1:04 PM, MiD-AwE <cr.midda...@gmail.com> wrote: > > I appologize for the newb-ish question. I found my answer in "return > false;" > > I'm not deleting this in case someone else needs a good example of > where this is necessary. (my background in is LISP (exit) and VB, so > please understand the dumb question). > > On Jun 24, 12:50 pm, MiD-AwE <cr.midda...@gmail.com> wrote: > > Hi all, > > > > I have a function that will run everytime a link in my menu is > > clicked. The problem is that one of the links point to an https and > > appropriately opens in a new window/tab. I want to break out of the > > function so that my page does not go blank as a result. > > > > I tried the .end(); function but it doesn't seem to do what I expected > > as my page goes blank and the https is opened in two other windows/ > > tabs. > > > > below is my exception as it stands:[not complete code - only for > > illustration] > > > > var href=""; > > > > if (href == ""){ > > $.end(); <- here is where I need to break out. > > } else { > > $('#content').html($(href).html()); > > }; > -- I have failed as much as I have succeeded. But I love my life. I love my wife. And I wish you my kind of success.