-4

a href= "javascript :;" class="filter" data-filter="" works fine, but it does not work with responsive meanmenu by meanthemes, can someone please help, thanks in advance.

I tried the option in meanmenu not to remove the class attributes but it failed.

  • Don't understand what you are asking for. Please edit your question – IsraGab Apr 17 '16 at 06:33
  • I am creating a webpage with a hyperlinks menu bar on the top of the page. When I click a link in the menu bar I am calling a javascript that will display portfolio item images in the body of the page. Means when I click web design it shows images tagged under web design. When I click mobile it displays images pertaining to mobile. I already have it working from a template that I downloaded. But when I am using the mobile responsive menu bar called meanmenu the javascript does not work. The mobile responsive menu only opens links to Web pages. I hope you are perceiving my problem now...thanks – Faisal Darbar Apr 17 '16 at 12:31

2 Answers2

0
  • Sorry, but I can't find the begining of something that would start to make any sense in your question.

  • It seems to be very specific to a particular context. You could perhaps succintly describe that context ...

  • ... and specifically what you are trying to achieve.

Some hints, though :

<a href="javascript:§some code here§;" §other relevant attributes§>;" ...>

is generally not a good idea :

The HTML Anchor Element () defines a hyperlink to a location on the same page or any other page on the Web.

The element that is intended to react to a click by executing JS code is the

<button>

Second best would be a

<div>

or at last resort a

<span>

if you really need your action to be in-line, which would be a bit unorthodox from a UX point of view.

At any rate : give your clickable element an id attribute, then, in a distinct and separate .js file, define what it does like so :

document.getElementById('thatId').addEventListener('click', function(e){
     /* 
     * Your code goes here.
     * The event argument e holds all what you need to know about
     * what was clicked.
     */
});

In the "Related" side bar, I see this very relevant thread. Read it seriously.

Community
  • 1
  • 1
Éric Viala
  • 596
  • 2
  • 12
  • I am creating a webpage with a hyperlinks menu bar on the top of the page. When I click a link in the menu bar I am calling a javascript that will display portfolio item images in the body of the page. Means when I click web design it shows images tagged under web design. When I click mobile it displays images pertaining to mobile. I already have it working from a template that I downloaded. But when I am using the mobile responsive menu bar called meanmenu the javascript does not work. The mobile responsive menu only opens links to Web pages. I hope you are perceiving my problem now...thanks – Faisal Darbar Apr 17 '16 at 12:51
0

I am creating a webpage with a hyperlinks menu bar on the top of the page. When I click a link in the menu bar I am calling a javascript that will display portfolio item images in the body of the page. Means when I click web design it shows images tagged under web design. When I click mobile it displays images pertaining to mobile. I already have it working from a template that I downloaded. But when I am using the mobile responsive menu bar called meanmenu the javascript does not work. The mobile responsive menu only opens links to Web pages. I hope you are perceiving my problem now...thanks