Has anyone used the Superfish navbar menu sucessfully with WordPress 3.0 menu manager?I have got the regular Superfish menus to work with the new WordPress Menu system, but not the navbar menu.
I'm in trouble implementing superfish in a website project. My problem is: I have a category based menu item that has two sub-levels set to display horizontally. I hover the first menu item and the first sub- level shows. Then I click the first sub-level and both it and its parent-item get highlighted and stay visible.Then I do the same to the sub-level below these but it doesn't work. This second sub-level gets the right class ('current') but the first level loses its 'current-cat-parent sfHover sf-breadcrumb' classes causing all levels to disappear.
I ma just trying to figure out how I might center a superfish menu - and possibly make the top level LIs 'auto size'. It sees the menu will only float left or right. Of course I am not a css guru either - it could be staring me in the face.
I was basically trying to follow several tutorials to get a superfish menu working on my website, but I don't seem to be able to get it to work.I included both the superfish.css and the superfish.js in my website's header; both paths are corrent and point to the designated file.I then included the superfish function in my header like this:
<script> $(document).ready(function(){ $('ul.sf-menu').superfish({ delay: 1000, // one second delay on mouseout animation: {opacity:'show',height:'show'}, // fade-in and slide-down animation
[code]....
The corresponding <ul> element has the required sf-menu class, but still there are no animations, no fading, no delays, just the plain css functionality provided by the superfish.css.
I am new to javascript and am eager to learn. I know I could probably just use jQuery to make this cross-browser but I would like to learn the ins and outs of javascript before abstracting them away. Our website currently has a navbar that is coded in HTML on every single webpage so changing it means changing every single webpage. So I want to make this more dynamic (and animated) by using javascript.
The problem is that IE is not cooperating. Specifically, IE loads everything alright but does not slide. It just loads the whole submenu instantaneously after a user clicks. Firefox works perfectly. At the top of my test page is a doc type statement inherited from the real index
Trying to use a <body id=""> tag to simulate a hover event on any given image of my navbar. Is it possible? Could a "swap image" script work? I'm willing to place the images in an "li,ul" list if need be.
I want to get some idea of what methods there are to center a div element.If you know a cool method please show us how it's done using this jsfiddle dummy to start
I need to make it so that whenever the user lands on a specific div or class the window gets centered around it. The idea is that I have a link to a div and I need that when users click on that link and land on that div the window is centered around the div.[code]...
I have two separate questions. One being, how would I go about having the container resizing itself for different image sizes. So that surrounding elements can conform to it's size?
Also, is there a way to align the images in a slide shows so that it is always horizontally and vertically centered in the slideshow?
I need to find out how to center an element on a form that scrolls. I have code (below) that displays a dialog, but I can't figure out how to make sure the dialog is centered on the page when the dialog displays as the user scrolls down the page. The dialog is displayed from a click on a href tag. I thought I could get the x,y coordinates where the href was click, but can't figure out how to center since the href can be at either the upper or low end of the page when it shown.
<script type="text/javascript"> var xCoord; var yCoord; $(document).ready(function () { // if user clicked on button, the overlay layer or the dialogbox, close the dialog $('a.btn-ok, #dialog-overlay, #dialog-box').click(function () { [Code]...
I have a routine that centers an object. I pass it a string such as "#myid" and it sets the 'left' property based on the width of the object and of the monitor.
Now in theory I could just use <center> tags, but I'm trying to center an object that is positioned using the 'absolute' attribute. It seems that <center> tags have no effect on 'absolute' positioned objects.
(I need the 'absolute' because the screensscroll underneath it). Anyway, I've been told that this is bad practice, and positioning should always be done via css, and never jquery/javascript. But I don't see any other way to do this. Is there one?
[URL]the second example allows getting the mouse position on click within a div area ,would it be possible to move the center of that area to where the mouse cursor was clicked at? This is what I came up with but the area isn't moving:
<html> <head> <style type="text/css"> body { background:#eee; margin:0em; }
Essentially the idea is to make Element-B and Element-C to cover the area horizontally starting from center of Element-A and ending at the edge of viewport.So, I guess i want to get the distance value from the center of Element-A to the edge of viewport
Additional notes:
Element-A doesnt have static position or size. Element-B and Element-C verticalposition or height is irrelevant.
I was thinking something like this:Calculate width of Element-A and divide it by two ( Or just get half the width if theres a way. ) Get the distance from the edge of Element-A to the edge of Viewport Add up these calculated values.Of course unless theres way to get that this width straight up )I was trying to look for a way to do list item 2.
I have 2000px width images that I want to be centered in a 100% width slideshow. I basically want my images to cover the entire width of the page, and also be centered.
Nothing has worked for me. No matter what I do, my images get pushed to the right and far off from the center.
I am trying to combine the centering of the images. I get for the image title "undefined" If I remove the <div id="slide">...</div> the titles display normally.
I'm trying to get some thumbnail images that are displayed with ClueTip to be centered vertically & horizontally. The images are various sizes, though none is larger than 150px on a side, so I set ClueTip to have a width & height of 200px. The images are wrapped in a div so that I can have them display: none by default, yet assign display: block to the images themselves. div.DownloadStatsThumb { display: none; vertical-align: middle; } img.DownloadStatsThumb { display: block; margin: auto; } The markup looks like so: <a href="#" rel="#thumb_456" title="">foo</a> <div class="DownloadStatsThumb" id="thumb_456"> <img src="/path/to/some/image.jpg" width="150" height="101" alt="thumbnail image" class="DownloadStatsThumb" /> </div>
The images are always aligned left & top. Eventually, I figured out that it was div#cluetip-inner that was the culprit. While the outer div has a height and width, the inner div has display:inline-block and so was shrinking down to the img size, essentially. I then added: onActivate: function(e){ $('#cluetip-inner') .css('display', 'block') .css('width', '186px') .css('height', '186px') .css('vertical-align', 'middle') .css('background-color', '#000'); return true; } The 186px is to avoid getting scrollbars and the BG color is to assure myself that it's resizing ok. However, the images remain centered horizontally only. Is there something else I've missed?
I'm having a really hard time trying to solve a problem. I have a container DIV aligned center that holds an image. The container is max 940 X 609. The image is set to be 100% width and height.
The objective is to have the container shrink as the user resizes the browser up until a minimum size - say, 400 X 259. I also need the container to stay centered with consistent margins on the right and left.
I am trying to use the jquery keydown event.I wan to fade in a div that is a form then when the user presses keycode 17 meaning control key this div and form will fade in at the center of the screen.here is the code I have:
This is in a php file and echoing the code. So the " " ignore it it's just saying to php that those are to be echoed as " " This code isn't working. I would press control key but no fade in occurs. I include this php file to all my websites webpages which are php files.