This is my third jquery script, and parts of this have been taken from other scripts. I'm trying to implement the following feature:
I've spent 4 hours trying to figure out how to get the submenu to display left if the browser window is too small. Currently it only works on large resolutions too. I found one script on here, but it only detected it on page load. This script used offset(), and this caused my marquee to fail on firefox. I'd like to avoid this if possible.
The menu is running here: http://www.mantisclan.com/beta/dropdown/
I'd like to use .addClass and .removeClass to set the left: position of the submenu.
Thanks for the help, I will learn from this.
So it seems to work here: http://jsfiddle.net/JLUqH/2/. However I don't like this effect because it is quite impossible to control the menu, it pops up, collapses very fast.
Try changing the event from hover to click.
There are a lot of jQuery plugins that handle drop down menu creation for you: 38 jQuery And CSS Drop Down Multi Level Menu Solutions
Related
I have a toggle dropdown menu button that appears on smaller resolutions/devices, but for some reason it isnt working. When clicked, nothing appears/shows.
Most likely there is something missing (JS function that makes it open maybe). Copying entire code doesn't make too much sense to me, so I am just using some of it:
http://goo.gl/TNixQe
UPDATE
True about responsive design. Now I noticed it (but did you say about it in your question? nope.).
When I tried to resize window firebug had found this error:
This error appears in js_func.js file in 9 row. Are you sure you link libraries correctly? JS can't find uniform() function.
Possibly this error is appearing, because all your instructions are in simple function. Try to add them to onload handler. Possibly browser try to load this instructions before uniform library had been loaded.
I meant this:
$(document).ready(function()
{
// use `uniform()` function on elements
}
OLD ANSWER
It is simple drop-down menu, based on lists. It is working throw hover handlers.
You can't do 'hover' on your mobile device. You can tap on screen only.
If you want users with gadgets use your site, you have to create menu espesially for gadgets.
Small trick, which helped me (because I am lazy :)) is to assign javascript:void(0); to 1 level buttons hrefs. This worked on SGS2 and Xperia Z1, but I am not sure it will work everywhere. With that trick, a man will tap on menu button and drop-down menu will appear.
You have a javascript error on line 9 of js_func.js:
Uncaught TypeError: Object [object Object] has no method 'uniform'
This will be causing any code below it not to be run.
Could it be a missing plugin on the mobile version?
A quick google suggests that the issue is with your jquery verison, they say to downgrade to 1.8.3.
In your case you are using 1.8.2, so try upgrade to 1.8.3.
I want to implement navigation in a website using the middle button function of scrolling ("clicking" (please re-read clicking) the middle button and roaming around the borders) but I would like this to happen instantly without the need for user input. Something of the kind:
$(element).mouseover(function(){
roamAround(); //I've tried SIMULATING (NOT <--- DETECTING)
//a middle-click from the mouse but failed
});
I am currently using google-chrome and at this stage of development I am not really concerned about cross-browsing this function. If it should work on chrome then it's fine.
What would be the best way to do this using native functions or emulation? Thank you very much!
EDIT: I don't want to DETECT user input, please re-read the question :)
Sounds like you want, like Deryck said, infinite scrolling. There's a jQuery plugin jScroll that does a simpler version for vertical content that can either be auto-loaded or loaded by a button press. You can view the code on Github to see how to do something similar, i.e. your roamAround function could mimic the _load function found there.
I am creating a CRM sort of application. There are multiple tags at the top of page. Clicking on the tags, should bring up, a chrome dev tools like panel(Ctrl+Shift+I) which will basically contain a table.
I searched the web, but could not find how to go about creating one. Neiter jQueryUI has any element of that sort, nor the bootstrap library from twitter has something like that.
In case you could throw in some pointers, along those lines. It will be helpful for me.
Thanks!
I am using twitter bootstrap, so that will be helpful.
PS : You can press Ctrl+Shift+I in chrome, to generate the panel, I am talking about.
This is a fairly broad question that potentially has many solutions depending on your exact needs, scenario and skillset. Also, it's always best to post an attempt at the problem to get a better response.
One solution would be to simply hide (display: none;) a sticky div that is attached to the bottom of the window. To show/hide you can use js and either a button/link or try something like http://plugins.jquery.com/project/hotkeys if you want to activate it with a keyboard shortcut.
So I have a bit of script at the bottom of my page //RETAINER CURRENT that is supposed to hide and show content based on what menu item the user selects in the maincontent area. Unfortunately in IE7 all layers are rendered which means the videos in each layer play simultaneous. I tried .detach, .remove, methods and had no luck and when I saved the items to an array and .empty 'd them I still had no success. What noob mistake am I making?
http://jsbin.com/ahuye4/3
I had the same issue. I was using asp.net so the way I was able to solve this was by using updatepanels and handling the hiding/showing in the code behind with Panels.
I'm not sure what fraemwork/language you are using.
However, I think you might need to call into the flash object and pause/stop the flash videos programmatically.
I've to write css for a simple/ horizontal menu for a CMS and i've to write css as if client will add subpages to main page and subpages of of subpages
I mean right now it's simple navigation no dropdown but in future it can single level dropdown or multilevel dropdown
and if navigation will have dropdown then dropdown links should be accessibile by keyboard also and it should work in all browsers without javascript except IE6 for IE 6 i will add javascript . I'm already using jquery on site for other things.
and i have to use css sprite for menu background image so if images is disabled then on menu link text should be shown as ALT text.
Is this possible make this type of menu with all these things?
You cannot use your keyboard to access CSS-only menus without JavaScript. That's just not possible.
But, if you can live with that, I found tonnes of stuff on google in an instance.
The first result shows some good examples of dropdown menus, but theres a huge amount of stuff out there.
Still, there are disadvantages, as you cannot make any delay at all when the user hovers the menu with the mouse. You'll need good ol' JavaScript for that, too.
Hope that helps some.