Search Results

Search found 54311 results on 2173 pages for 'right click menu'.

Page 12/2173 | < Previous Page | 8 9 10 11 12 13 14 15 16 17 18 19  | Next Page >

  • click events issue in jquery.

    - by alex
    I don't know if the title explain this situation well. Below is a code i wrote to create div elements when the button is pressed. Then By clicking on any of the created divs, we can change the div background by choosing a color from the drop down box. However if i click on another div and tried to change the color by selecting another color from the drop down, the previously clicked divs also gets affected by the new color. Why is this happening. I only want the selected div to change color, without affecting the previously clicked divs. I read allot of threads on this site, some of which talks about unbinding clicks, but I'm unable to solve the problem. Thanks for the help. <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js" type="text/javascript"></script> <style> .aaa { width:100px; height:100px;background-color:#ccc;margin-bottom:5px;} p{widht:500px; height:500px; margin:0px; padding:0px;border:2px solid red;color:#000;} </style> <select id="item_select" name="item"> <option value="1">red</option> <option value="2">blue</option> <option value="3">green</option> </select> <button>Click to create divs</button> <p id="ptest"></p> <script type="text/javascript"> var dividcount = 1; $("button").click(run); function run(){ var myDiv = $('<div id=lar'+dividcount+' class=aaa></div>'); $(myDiv).clone().appendTo('#ptest'); $(dividcount++); $("div").bind('click',(function() { var box = $("div").index(this); var idd = (this.id); $("#"+idd).text("div #"+idd); $("select").change(function(){ var str= $("select option:selected").text(); $("#"+idd).css("background-color",str); }); })); }; </script>

    Read the article

  • ListView Long Click Animation

    - by spaceboy2000
    I would like to capture long click events in a ListView, which was easily done using a OnItemLongClickListener. However, that lacks the fading animation of the selector transitioning to a long press that is seen when the long click is handled by onCreateContextMenu. How can I get that animation using OnItemLongClickListener?

    Read the article

  • html body gwt click event

    - by user153506
    html file has two textbox and one button. but i need to generate click event when i only click outside of the two textboxes and button element.how can i do that. RootPanel.get().addEventListener or something like that?? help.

    Read the article

  • Assign an existing click event function to another click event using jquery

    - by Peter Delahunty
    Ok so i have some html like this: <div id="navigation"> <ul> <li> <a>tab name</a> <span class="delete-tab">X</span> </li> <li> <a>tab name</a> <span class="delete-tab">X</span> </li> <li> <a>tab name</a> <span class="delete-tab">X</span> </li> <li class="selected"> <a>tab name</a> <span class="tab-del-btn">X</span> </li> </ul> </div> I then have javascript that is excuted on the page that i do not control (this is in liferay portal). I want to then manipulate things afterwards with my own custom javascript. SO... For each of the span.delete-tab elements an on-click event function has been assign earlier. It is the same function call for each span. I want to take that function (any) and call it from the click event of the span.tab-del-btn ? This is what i tried to do: var navigation = jQuery('#navigation'); var navTabs = navigation.find('.delete-tab'); var existingDeleteFunction = null; navTabs.each(function (i){ var tab = jQuery(this); existingDeleteFunction = tab.click; }); var selectedTab = jQuery('#navigation li.selected'); var deleteBtn = selectedTab.find('.tab-del-btn'); deleteBtn.click(function(event){ existingDeleteFunction.call(this); }); It does not work though. existingDeleteFunction is not the original function it is some jquery default function. Any ideas?

    Read the article

  • Detect if selected element is an anchor on right click

    - by Yawn
    I'm writing a small firefox addon to grab urls and send them to a site. What I want to do is be able to right click on a link (but not have to actually highlight it) and be able to click send and the links href value is grabbed and sent. The bit I'm having trouble with is detecting if the selected element is an anchor and grabbing it's href. Many thanks for any help given :)

    Read the article

  • jQuery click off element event

    - by Nic Hubbard
    I have a floating div that gets displayed, and I want it to be hidden when the user clicks off the div. This would be similar to the .hover() funtion callback when hovering off an element. Only I want to do this for click. I tried just setting a click event for the body, which would hide the div, but that gave unexpected results. Anyone have ideas on how I could easily do this?

    Read the article

  • jquery - "click" on keypress?

    - by WonderBugger
    I have an ajax search form that works fine if you click "submit" in that you enter a zipcode, click the "Enter" button and up pops results instantly. I'm trying to make it so that if the user presses "enter" on the keyboard, it has the same effect. It looks like it's submitting, but no results come up... I tried: if($('#search').length) { $('#zipcode').keyup(function(e) { if(e.keyCode == 13) { e.preventDefault(); $('#search').submit(); } }); }

    Read the article

  • Why does Alacarte give me this error when I try to add items to the menu?

    - by RichardoC
    When I try to add anything to the menu in 12.04 I get this error. $ alacarte Traceback (most recent call last): File "/usr/share/alacarte/Alacarte/MainWindow.py", line 317, in on_new_item_button_clicked process = subprocess.Popen(['gnome-desktop-item-edit', file_path], env=os.environ) File "/usr/lib/python2.7/subprocess.py", line 679, in __init__ errread, errwrite) File "/usr/lib/python2.7/subprocess.py", line 1249, in _execute_child raise child_exception OSError: [Errno 2] No such file or directory Thank you, R.C.

    Read the article

  • Kohana 3: How to find the active item in a dynamic menu

    - by Svish
    Maybe not the best explanation, but hear me out. Say I have the following in a config file called menu.php: // Default controller is 'home' and default action is 'index' return array( 'items' => array( 'Home' => '', 'News' => 'news', 'Resources' => 'resources', ), ); I now want to print this out as a menu, which is pretty simple: foreach(Kohana::config('menu.items') as $title => $uri) { echo '<li>' . HTML::anchor($uri, $title) . '</li>'; } However, I want to find the $uri that matches the current controller and action. And if the action is the default one or not. What I want to end up with is that menu item should have id="active-item" if it is the linking to the current controller, but the default action. And id="active-subitem if it is linking to the current controller and the action is not the default one. Hope that made sense... Anyone able to help me out here? Both in how to do this in Kohana 3 and also how it should be done in Kohana 3. I'm sure there are lots of ways, but yeah... any help is welcome :) Examples: domain.com -- Home should be active-item since it is the default controller domain.com/home -- Home should be active-item domain.com/home/index -- Home should be active-item since index is the default action domain.com/resources -- Resources should be active-item domain.com/resources/get/7 -- Resources should be active-subitem since get is not the default action

    Read the article

  • Blackberry horizontal scroll in bottom menu bar

    - by Dachmt
    Hi, I have a MainScreen that has an overlay menu at the bottom of the screen, over a map. To do that, I have an MenuHoster (extends HorizontalFieldManager) that takes all width of the screen, 45px height and at the bottom of the screen. It overlays a map. In my MenuHoster, and add another HorizontalFieldManager that has a background image (my menu bar image) and focusable buttons. I have too many buttons to be all in my screen, so I want to an horizontal screen. When I create my second HorizontalFieldManager that hosts the buttons, I define the Manager.HORIZONTAL_SCROLL as style. My buttons are focusable, but nothing happens... The focus change to the next buttons but my HorizontalFieldManager does not scroll... I tried putting the same parameter in my MenuHoster HorizontalFieldManager, the scroll is working but all my screen goes right or left, and I want only the content of my menu bar... So there is my map and my menu going left, my buttons at the bottom and the rest of the screen white. Any idea why my second HorizontalFieldManager hosting the buttons does not scoll? Thank you!

    Read the article

  • HTML & CSS Horizontal menu with items on left & right

    - by Fabian Vilers
    Hi all, I'm building an horizontal menu in html+css. The current result is fine, except I want to have some items on the left, and others on the right. I couldn't find usefull result on Google with such common keywords so I'm asking on SO. Here's my code so far: #menu { background-color: #383838; height: 65px; margin-bottom: 20px; } #menu ul li { float: left; } <div id="menu"> <ul> <li>Link 1</li> <li>Link 2</li> <li>Link 3</li> </ul> </div> I'd like to have Link 3 on the right, so the space between link 2 and 3 should be filled at maximum. I don't want a filler <li> tag, but instead apply a class to the last <li> on the left, or the first <li> on the right. Don't want to adjust the width as I've a :hover background color changing effet on the links. I suppose margin or padding should do the trick but I can't manage to find how. Any clue? Thanks in advance, Fabian

    Read the article

  • ASP Menu driving me insane

    - by simplesimon
    Hi there, I am trying to create a menu using ASP (I have never used ASP before, im a PHP man) using values stored in a database. basically the html layout i want is as such: <ul> <li> <ul class="sub-menu"> <li class="sub-menu-li">Test</li> </ul> </li> </ul> I need to loop around the root menu items rs("AD_Level") which is equal to 0 for root objects, then inside that loop, lop around anything that has the same parent id eg if the current record is AD_Level =0 and AD_Parent=5 then loop around all items with AD_Parent 5 and AD_Level != 0 and insert the values into html and so on and so forth. Please help! I am struggling with a new language and cannot see a way to do this without losing sanity Edit (Extracted from Comment by OP) while not rsAdmin.eof sPar = rsAdmin("ad_parent" if rsAdmin("AD_Level")=0 then while not rsAdmin2.eof if rsAdmin2("AD_Level")<>0 and rsAdmin2("ad_parent")=sPar and rsAdmin2("AD_Sec_Level")=>2 then response.write rsAdmin("AD_Menu") end if rsAdmin2.movenext wend end if '' # if not rsAdmin.eof then sPar=rsAdmin("AD_parent") rsAdmin.movenext wend that is my code

    Read the article

  • scrolling and css align with "right: 0px"

    - by Gabi
    Hello, In an HTML page, if I align some <div>s with "right: 0px", they all look very nice, as I expect. However, if I make the browser window smaller and the horizontal scroll bar appears, when I scroll the page to the right, I see an unexpected white space (instead of the background colors of my <div>s). It seems that my <div>s are aligned relative to the visible area of the page. See the sample code below: <html> <head> <style> <!-- #parent { position: absolute; left: 0px; right: 0px; top: 0px; bottom: 0px; background-color: yellow; } #child { position: absolute; left: 100px; top: 300px; width: 1000px; height: 400px; background-color: blue; } --> </style> </head> <body> <div id="parent"><div id="child">some text here</div></div> </body> </html> Is there any way to make the "right: 0px" property align the controls relative to the size of the entire page, not only the visible area? Thanks.

    Read the article

  • jQuery Context Menu Plugin and Capturing Right-Click

    - by Ben Griswold
    I was thrilled to find Cory LaViska’s jQuery Context Menu Plugin a few months ago. In very little time, I was able to integrate the context menu with the jQuery Treeview.  I quickly had a really pretty user interface which took full advantage of limited real estate.  And guess what.  As promised, the plugin worked in Chrome, Safari 3, IE 6/7/8, Firefox 2/3 and Opera 9.5.  Everything was perfect and I shipped to the Integration Environment. One thing kept bugging though – right clicks aren’t the standard in a web environment. Sure, when one hovers over the treeview node, the mouse changed from an arrow to a pointer, but without help text most users will certainly left-click rather than right. As I was already doubting the design decision, we did some Mac testing.  The context menu worked in Firefox but not Safari.  Damn.  That’s when I started digging into the Madness of Javascript Mouse Events.  Don’t tell, but it’s complicated.  About as close as one can get to capture the right-click mouse event on all major browsers on Windows and Mac is this: if (event.which == null) /* IE case */ button= (event.button < 2) ? "LEFT" : ((event.button == 4) ? "MIDDLE" : "RIGHT"); else /* All others */ button= (event.which < 2) ? "LEFT" : ((event.which == 2) ? "MIDDLE" : "RIGHT"); Yikes.  The content menu code was simply checking if event.button == 2.  No problem.  Cory offers a jQuery Right Click Plugin which I’m sure works for windows but probably not the Mac either.  (Please note I haven’t verified this.) Anyway, I decided to address my UI design concern and the Safari Mac issue in one swoop.  I decided to make the context menu respond to any mouse click event.  This didn’t take much – especially after seeing how Bill Beckelman updated the library to recognize the left click. First, I added an AnyClick option to the library defaults: // Any click may trigger the dropdown and that's okay // See Javascript Madness: Mouse Events – http: //unixpapa.com/js/mouse.html if (o.anyClick == undefined) o.anyClick = false; And then I trigger the context menu dropdown based on the following conditional: if (evt.button == 2 || o.anyClick) { Nothing tricky about that, right?  Finally, I updated my menu setup to include the AnyClick value, if true: $('.member').contextMenu({ menu: 'memberContextMenu', anyClick: true },             function (action, el, pos) {                 … Now the context menu works in “all” environments if you left, right or even middle click.  Download jQuery Context Menu Plugin for Any Click *Opera 9.5 has an option to allow scripts to detect right-clicks, but it is disabled by default. Furthermore, Opera still doesn’t allow JavaScript to disable the browser’s default context menu which causes a usability conflict.

    Read the article

  • Navigate Quickly with JustCode and Ctrl+Click

    Ctrl + Click is a widely used shortcut for Go To Definition in many development environments but not in Visual Studio. We, the JustCode team, find it really useful so we added it to Visual Studio. But we didn't stop there - we improved it even further. Read on to find the details. With JustCode you get an enhanced Go To Definition. By default you can execute it in the Visual Studio editor using one of the following shortcuts: Middle Click, Ctrl+Left Click, F12, Ctrl+Enter, Ctrl+B. The first usage of this feature is not much different from the default Visual Studio Go To Definition command use it where a member, type, method, property, etc is used to navigate to the definition of that item. For example, if you have this method:         public void Start()         {             lion = new Lion();             lion.Roar();         } If you hold Ctrl and click on the usage of the lion you will go to the lion member definition. If you hold Ctrl and click on the Lion you will go to the Lion class definition. What we added is the ability to easily find all the usages of the item you just navigated to. For example:     public class Lion     {         public void Roar()         {             Console.WriteLine("Rhaaaar");         }     }   If you hold Ctrl and click on the Lion definition you will see all the usages of the Lion type; if you click on the Roar method definition you will see all the usages of the Roar method: And if there is only one usage you will get automatically to that usage. In the examples I use C#, but it works also in VB.NET, JavaScript, ASP.NET and XAML. Why we like this feature? Let me first start with how the Ctrl+Click (or Go To Definition command) is used. We noticed that developers use it especially in what we call "code browsing sessions". In simple words this is when you browse around the code looking for a bug, just reading the code or searching for something. Sounds familiar? In our experience when you go to the definition of some item you often want to know more about it and the first thing you need is to find its usages. With JustCode this is just one click away. Why Ctrl+Click/Middle Click over F12/Ctrl+Enter/Ctrl+B? Actually you can use all of them. But during these "code browsing sessions" we noticed that most developers use the mouse. So the mouse is already in use and pressing Ctrl+Click (or the Middle Click) is so natural. During heavy coding sessions or if you are a keyboard type developer F12 (or any of the other keyboard shortcuts) is the key. We really use heavily this feature not only in our team but in the whole company. It saves us a bit of time many times a day. And it adds up. We hope you will like it too. Your feedback is more than welcome for us. P.S. If you dont want JustCode to capture the Ctrl+Click and the Middle Click in the editor, you can change that in JustCode->Options->General in the Navigation group. Keyboard shortcuts can be reassigned using the Visual Studio keyboard shortcuts editor.Did you know that DotNetSlackers also publishes .net articles written by top known .net Authors? We already have over 80 articles in several categories including Silverlight. Take a look: here.

    Read the article

  • Flash under dhtml menu

    - by David
    I'm struggling with this probelm for few hours and it's drives me crazy. I want my drop down menu put over flash area and it works but only in FF. Unfotunelly IE and Opera shows my menu under flash. The DHTML menu system is the simplest as possible and it was wrote from scratch by me. I've been trying everything, and still it doesn't work like it should. I tried to put the flash element by jquery.flashEmbed script and by standard code with param transparent, but it never works. Plese help me, I'm loosing my head. Here is the xhtml: http://www.project.yamandi.com/toton/ Regards, David

    Read the article

  • Customizing the Superfish drop-down menu

    - by Pieter
    I've been tinkering around with the excellent Superfish drop-down menu to fit my needs. Here's the result. Still, there are two oddities I need to fix. Since I changed the font family and font size used for the items in the menu bar, the drop-down menus are aligned incorrectly a few pixels lower than where they should be. Secondly, when I hover over a menu item that has a submenu, an arrow to the right is displayed but it's not as visible as it should be due to the light background color. Can I change this quickly without making a new arrow image?

    Read the article

  • Issues after customizing the Superfish drop-down menu

    - by Pieter
    I've been tinkering around with the excellent Superfish drop-down menu to fit my needs. Here's the result. Still, there are two oddities I need to fix. Since I changed the font family and font size used for the items in the menu bar, the drop-down menus are aligned incorrectly a few pixels lower than where they should be. Secondly, when I hover over a menu item that has a submenu, an arrow to the right is displayed but it's not as visible as it should be due to the light background color. Can I change this quickly without making a new arrow image?

    Read the article

  • PHP Menu Question

    - by Vecta
    As one of the steps toward a greater website redesign I am putting the majority of the content of our website into html files to be used as includes. I am intending on passing a variable to the PHP template page through the URL to call the proper include. Our website has many programs that each need an index page as well as about 5 sub-pages. These program pages will need a menu system to navigate between the different pages.I am naming the pages pagex_1, pagex_2, pagex_3, etc. where "pagex" is descriptive of the page content. My question is, what would be the best way to handle this menu system? Is there a way to modify the initial variable used to arrive at the index page to create links in the menu to arrive at the other pages? Thanks for any help!

    Read the article

  • jQuery: preventDefault() not working on input/click events?

    - by Jason
    I want to disable the default contextMenu when a user right-clicks on an input field so that I can show a custom contextMenu. Generally speaking, its pretty easy to disable the right-click menu by doing something like: $([whatever]).bind("click", function(e) { e.preventDefault(); }); And in fact, I can do this on just about every element EXCEPT for input fields in FF - anyone know why or could point me towards some documentation? Here is the relevant code I am working with, thanks guys. HTML: <script type="text/javascript"> var r = new RightClickTool(); </script> <div id="main"> <input type="text" class="listen rightClick" value="0" /> </div> JS: function RightClickTool(){ var _this = this; var _items = ".rightClick"; $(document).ready(function() { _this.init(); }); this.init = function() { _this.setListeners(); } this.setListeners = function() { $(_items).click(function(e) { var webKit = !$.browser.msie && e.button == 0; var ie = $.browser.msie && e.button == 1; if(webKit||ie) { // Left mouse...do something() } else if(e.button == 2) { e.preventDefault(); // Right mouse...do something else(); } }); } } // Ends Class

    Read the article

  • Set Static block in Right side in Magento site

    - by yogs
    Hi I am new for Magento and don't much knowledge of programing what i want to do is i heve three categories on my site and created three static blocks for it and set it up on middle of each category page with their related block all working fine but now i want to move it in Right Sidebar in My site so pls. suggest how and where do i change to display my Static block in Right sidebar Example : I have three Categories and three static block for each category : Womens,Mens,Kids - Static Bloks : womens_block,mens_block,kids_block now pls. suggest how can i move it to Right side of my page Above Shopping cart. Any help is appreciated Thanks in Advance.

    Read the article

  • How to Detect a Right Click on Taskbar in WPF

    - by Zay
    I've got a WPF application in C# that starts off with a loading dialog. As expected, a button for the app shows up in the Windows taskbar. I would like to detect right-clicks that might be done to that button. Ultimately, I hope to disable the right-click or simply have the loading dialog regain focus. I've seen that some people use custom libraries and packages (interop, for example) to achieve some Win32 functionality, but I'd personally like to avoid this. Furthermore, these libraries/packages appear to be specific to Windows Forms; I've not seen anything for WPF. Is it impossible to manipulate the taskbar's right-click in WPF?

    Read the article

  • Mapping a drop-down menu over an image

    - by Pieter
    I have a menu bar that is rotated slightly. Here are two buttons as an example: As a result, I can't use regular HTML to handle this. I need to use a <map> to put hyperlinks over the menu parts. (Or am I missing a killer CSS feature I don't know about?) I want to map drop-down menus to these buttons. This looks like a nice way to implement drop-down menus: http://javascript-array.com/scripts/simple_drop_down_menu/ However, this does not work on <map>s, I believe. Or am I wrong? Is there a different approach I can take to constructing drop-down menus for a menu bar that is not aligned horizontally?

    Read the article

< Previous Page | 8 9 10 11 12 13 14 15 16 17 18 19  | Next Page >