The only way I can imagine Israel getting away with dropping one on Iran is if Iran continues developing nuclear technology.
1. The mother of all PR/lobbying campaigns successfully preserves US support. Especially since it would already be underway before the attack.
2. Nothing changes, except there's now a big radioactive hole somewhere.
a) They have been attacked first by another large-scale WMD, such as a nuclear weapon or a chem/bio attack enough to potentially wipe out a significant proportion of the population, or
b) The so-called 'Samson option', whereby if the state were close to being overrun or destroyed by invading Arab armies it would first threaten to use its nukes against the capital cities of the invading countries and, if the threat were not sufficient, follow it up with actual launches.
The fact that Israel did not even get to the stage of openly threatening the use of the Samson option in 1973, when it came very, very close to losing it all, is strong evidence in favour of its stance as a rational defensive power. In fact, both a) and b) are intended as deterrents, as both scenarios assume the near or total destruction of Israel and wouldn't be any good in saving the country if things got to that stage, but they're intended to create such an inevitably catastrophic cost to any aggressor that trying to destroy the country is no longer worth the price.
Iran's nuclear ambitions should really be seen in a wider context than just Israel though. Iran is likely pursuing nuclear weapons not in order to attack Israel (or more ridiculously, defend itself against Israel), but in order to project power unchallenged across the Middle East and thus dominate the region in a way that no other country has done for decades. This is why the traditional Sunni Arab power centres of Saudi Arabia, Jordan and Egypt are just as wary about Iran's nuclear ambitions as Israel is. I would not be surprised if at least two of those countries have begun their own covert nuclear weapons programs in order to counter the Iranian one.
Let's say Iran had a nuke, and was feeling so threatened that it had to launch its nuke. If it takes out Jerusalem, it destroys a significant pilgrimage location for Islam, as well as the capital of the (local) great enemy. The US then comes and levels most of the country, and the Israelis likely drop a nuke on Tehran. There's also the pretty good possibility that the Israelis would be successful in shooting down the missile, but would still launch an overwhelming military response. Israel is now in bad shape, Iran is gone, and the rest of the local Arab countries are pretty unhappy, but still alive and kicking.
If they launch on Mecca, there's a much greater change of the thing detonating where it's supposed to. They also destroy a very significant Islamic pilgrimage site. The rest of the Arab world then converges on attacking Iran (with American blessing), as well as Israel (the Sunni states would use the logic that those evil Shiites must have conspired with the Israelis to do this). This results in the US now getting involved militarily to protect Israel, and now you've got a pretty serious war going on in the Middle East, disturbingly close to both India and Russia.
Of those two, the second causes much more hell - which is what they're going for. The second also has the benefit of making the Islamic states much more interested in dealing with their threats, and possibly getting the US to (covertly) be more accommodating.
Iran hasn't developed or bought a weapon yet that hasn't been used to attack Israelis.
If Iran gets a nuke and targets it somewhere else and doesn't use it, I'd be impressed. It would show a lot of restraint.
There's no doubt in my mind that Iran threatens Saudi Arabia -- I guess I just always thought of it in a more indirect way. It'd be good to see them pivot and disperse some of that revolutionary fever instead of pointing it all at the same place constantly [insert larger discussion on mideast politics here]