You can also create custom menu items without links, which will create <a>SOME MENU ITEM</a> ie anchor tag without href. In a sense you are creating sort of lower level span that holds some text and you can target it specifically or generally with CSS.
It even validates with transitional doctype.
There are numerous discussions about using void(0) vs # vs no href and why each approach is good and why it's bad. The bad thing about what I'm suggesting is that the anchor will not be accessible with non pointer based input devices. On the other hand it's easy to implement and maintain.
On the non-WP part of your question of "Setting parent menu item href to javascript:void(0)" (or actually my answer) try using
$('ul.main-menu-or-whatever-yourmenu-class-is').siblings('a').attr("href", "javascript:void(0);"); - this, for instance, will replace the href in all parent menu items wothout the need of targeting ID specifically