How to change icon submenu - php

Hello can anybody tell me how to change that + icon to an arrow can somebody help me
here is my code
.special-header-menu .sub-menu-controller {
url ('#');
}
But still cannot change it
IMG OF IT [MYWEBLINK][2]

Could you please, try to elaborate the issue more and provide some code. According to my understanding of your problem, I think you can use a conditionally updating css class for toggling down the display property and setting it to display : none when you have clicked the + button by listening to an onClick event or checking if there are child div inside that particular parent div of the button

Related

Jquery menu color change with PHP in it

i wanna apply a affect where my links gets a new color each time i press them... This i believe can be done with a jquery function, however my link are not linked to anything just som PHP so I cant make it work but here is what i wanna do:
Make this: http://jsfiddle.net/wD6C6/
Like this: http://jsfiddle.net/cnMdb/31/
Each time i press the links, they change color to for example blue.
Hope u guys can help me with this tricky one because my links are to some php and not just some # :)
You should add an onclick event to the links, to call a javascript function to change the background color of the link, and a target="_blank", to open the link in a new tab, so that a user can see the changed background color of the clicked link.
Or you can call the php pages using Ajax (I guess you meant this by saying "my links are to some php and not just some #"), and load the responseText to a part of the current page, so that the difference you make in the general design can be seen.
But if it is not the answer you seek for, then your question really needs some more explanation.
Not sure that I've understood your problem but...
Based on:
<div id="foo">
Click
Click
</div>
And whether the links point to php or are created by php should make do difference, you can do:
$(function(){
$("#foo a").click(function(){
var r=Math.floor(Math.random()*256-1);
var g=Math.floor(Math.random()*256-1);
var b=Math.floor(Math.random()*256-1);
rgb = "rgb(" + [r,b,g].toString() + ")";
$(this).css("color", rgb);
});
});
Here's a fiddleto play with.

how to inactive a link using jquery

I have jQuery site here. I have 4 links with in ul tag. Within this link, I need to inactive a link but have to show. See below:
<div class="over hide" id="waterSecondOver">
Overview
Local Area
Floor Plans
<a href="javascript:void(0);" id="chancingallery" >Gallery</a>
</div>
I have a click function on the above links (except the 4th one i.e gallery). See the code
JQR('#waterSecondOver a').click(function() {
// my code
});
Here I need to show the gallery link, but nothing happens when click on the gallery (i.e must be inactive link or what I say it's functionality is only show the link as "gallery ")
I think it's clear . Please help me
JQR('#waterSecondOver a').click(function(event) {
event.preventDefault();
});
Don't set hrefs in the anchor tags to javascript:void(0); - this is messy because it's needless repetition. With jQuery, it's possible to use return false; in your event callback to avoid the default click event taking you to a new page or the current one. While this is the easiest method, it's not always the best. See this article for more info:
http://fuelyourcoding.com/jquery-events-stop-misusing-return-false/
But you definitely don't want to be setting href manually.
I would simply change the class of the anchor(lets say class="active") and everytime onclick check for that "active" class. If the class is "active" do nothing else DO SOMETHING.
You can do this way for simplicity...
JQR('#waterSecondOver a').click(function(event) {
if(JQR(this).attr('id') == "chancingallery"){
// inactive all links except the one you dont want
}else{
// whatever you need....
}
});

How do I change this show/hide DIV code?

I am using this show/hide DIV code in my project: http://papermashup.com/demos/jquery-show-hide-plugin/
Currently, after you click VIEW, the div appears and the words VIEW become CLOSE, which you then hit to close the div. Is there anyway we could move the CLOSE so that it comes up inside the DIV that appears?
I'm new at this and I've been trying all night and I can't get it to work. Any help is appreciated.
With the append() function you can insert code into a certain div.
Try something like
$("#slidingDiv_2").append("<a href='#' class='show_hide' rel='#slidingDiv_2'>Close</a>");
If you want to leave that showHide.js alone, there is a simple solution.
1) Create the "Close" text in the div that appears
2) Give it the property so that when clicked, it executes a .slideUp() function that accomplishes the exact same thing as the other "Close" text in the sample page.
slideUp()

Use Jquery to prevent page reloading pressing anchor

I am trying to use the jquery to Prevent page realoading. I have the whole code php done... and is functional. if you can please go to http://www.jonathansconstruction.com/gallery3.php and click on the different gallery SUbmenus for category View All, Kitchen etc... i'm using get for variables. However, I would like to use a jquery to process the php so i dont have to include it into the gallery.php and also, to prevent page reloading because it brings the page back up and that could be confusing. Any hlep willl be greatly appreciated THanks
UPDATE, Thanks for everyone that helped:
SO far i made an advance on the website, Corrected URL was edited on top of the post
Everything is working smoothly on the effects of quicksand.. HOwever, Lytebox Doesn't Load when a quicksand effect is placed. , at the beginning it loads just fine, but right after pressing one of the menus for the quicksand effect. It stops working. Also, I want to style my menu buttons as is in http://www.jonathansconstruction.com/gallery.php. I see jquery doesnt add and witht the sample I downloaded. and also the that says "gallery Pictures" dissapears ont he quicksand demo.
Any Help is appreciated. Below is the script.js code I have modified so far
$(document).ready(function(){
var items = $('.photo_show figure'),
itemsByTags = {};
// Looping though all the li items:
items.each(function(i){
var elem = $(this),
tags = elem.data('tags').split(',');
// Adding a data-id attribute. Required by the Quicksand plugin:
elem.attr('data-id',i);
$.each(tags,function(key,value){
// Removing extra whitespace:
value = $.trim(value);
if(!(value in itemsByTags)){
// Create an empty array to hold this item:
itemsByTags[value] = [];
}
// Each item is added to one array per tag:
itemsByTags[value].push(elem);
});
});
// Creating the "Everything" option in the menu:
createList('View All',items);
// Looping though the arrays in itemsByTags:
$.each(itemsByTags,function(k,v){
createList(k,v);
});
$('#gallery_menu nav a').live('click',function(e){
var link = $(this);
link.addClass('current').siblings().removeClass('current');
// Using the Quicksand plugin to animate the li items.
// It uses data('list') defined by our createList function:
$('.photo_show').quicksand(link.data('list').find('figure'), {adjustHeight: 'dynamic'} );
e.preventDefault();
});
$('#gallery_menu nav a:first').click();
function createList(text,items){
// This is a helper function that takes the
// text of a menu button and array of li items
// Creating an empty unordered list:
var ul = $('<ul>',{'class':'hidden'});
$.each(items,function(){
// Creating a copy of each li item
// and adding it to the list:
$(this).clone().appendTo(ul);
});
ul.appendTo('.photo_show');
// Creating a menu item. The unordered list is added
// as a data parameter (available via .data('list'):
var a = $('<a>',{
html: text,
href:'#',
data: {list:ul}
}).appendTo('#gallery_menu nav');
}
});
ANOTHER EDIT :
All Looking good So far Fixed Lot of problems, However, for some reason, the span I had on teh static html dissapears from display and even html code when loading jquery quicksand code..?? Here is the code i have on the html part of the website that Does Not appear on the live website for some reason.
<div id="portfolio">
<div class="photo_show"><span>Gallery Pictures</span>
the span part doesnt appear, dont know why
I had the TOp Part Resolvd. just moved the on top of photo_show div and edited positioning... HOPEFULLY Last Edit
the jquery for quicksand made my calendar dissapear, checked and yes it was some jquery conflict but dont know what can be causing it.. also the form validation not working as well ... any help is appreciated!
I visited your webpage link after correcting a typo in the URL for word construction.
I also see the problem that the page reloads when clicking on a sorting filter such as View All, Kitchen, and Miscellaneous which is what you want to prevent.
Unfortunately, those buttons are using URL Links asking to reload the webpage with a filtered option via query string. Nothing can be done for that method of filtering, your just going to reload the webpage since filtering is done on page load.
Perhaps this DEMO shows what you want to accomplish since it does not reload the webpage. That demo has markup that is easy to create and maintain which is build using the Quicksand jQuery Plugin. The tutorial for that demo is accessed using the link at the bottom right, but looking at the source HTML file shows how simple it is.
I made a downloadable demo using both Quicksand and Shadowbox, a lightbox alternative HERE, which might interest you since your webpage is linking the filtered icon results to a lightbox alternative named Lytebox.
Since your edit reflects your interest in Lytebox, the following markup will reinitialize that lightbox alternative after a filtering event has occurred with Quicksand. Update your script.js file accordingly.
$('.photo_show').quicksand(link.data('list').find('figure'), function(){
adjustHeight = 'dynamic';
initLytebox();
});
I also made a correction to your existing adjustHeight since it was using a semicolon instead of an equal sign, but the correct location and use of that is for something unrelated.
The reason that you are not seeing the bullets is because your not using ul/li tags that the demo is using.

jQuery with disabled contents

i have a problem with my jquery code which is disabling all the text after i click the next profile.
Fig.1 : you will notice here that i can highlight the text and highlight the scrollbar in first frame.
Fig.2 : you will notice here that none of all are highlighted.
here's the jquery source that im currently using.
$(document).ready(function(){
$('.productList').hide(); // hide all details
$('#thumbsets li').bind('click',function() {
var tsLi = $(this).index(); // all elements have already an index
$('.productList:eq('+ tsLi +')').siblings().fadeTo(400,0).end().fadeTo(400,1);
});
});
i use this at all of my portfolio section. most of it are images. however, i tried to create a sample list of user profiles with this script function, but i found out that after my navigation switched to next profile member, it was already disabled (technically says, i can't scroll or highlight the text content).
is there possible way to adjust the script here? i doubt that the cause of my issue is:
var tsLi = $(this).index(); // all elements have already an index
$('.productList:eq('+ tsLi +')').siblings().fadeTo(400,0).end().fadeTo(400,1);
hope someone can help me about this. thanks in advance.
fadeTo docs manipulates only the opacity. So the faded elements become invisible but are still there and on top of the other elements.. (so you can not highlight those..)
you should use fadeIn docs and fadeOut docs instead, because those will also hide/show the element as well..
$('.productList:eq('+ tsLi +')').siblings().fadeOut(400).end().fadeIn(400);

Categories