• 0
Votes
name

A PHP Error was encountered

Severity: Notice

Message: Undefined index: userid

Filename: views/question.php

Line Number: 190

Backtrace:

File: /var/www/html/thecodehelp.com/application/views/question.php
Line: 190
Function: _error_handler

File: /var/www/html/thecodehelp.com/application/controllers/Questions.php
Line: 416
Function: view

File: /var/www/html/thecodehelp.com/index.php
Line: 315
Function: require_once

name Punditsdkoslkdosdkoskdo

make more entire div clickable on wordpress using jQuery

I state that I know practically nothing about html and javascript languages, I know the css. On wordpress, with visual composer, i was trying to make an entire row clickable. I've done it using a jQuery code founded online:

[removed] 
jQuery(".LinkZoom1").click(function() {
    [removed] = "http://www.framedvision.org/portfolio/videomapping_oggetti_milano/";
});
[removed]

I've added to the visual composer the object for java and I've put in the code. After I created the classes, inserted the link, added to the CSS the "cursor: pointer" function and everything works correctly.

THE PROBLEM IS THAT IT WORKS ONLY ON A SINGLE ROW. When I try to duplicate the code, assign different classes and links to create more clickable divs, it doesn't work. The result is that only the first div of the page is clickable, the divs are not.

WHAT I'VE TRIED

I tried the following codes in different combinations:

[removed] 
jQuery(".class1”).click(function() {
    [removed] = “#1”;
}); 
[removed]

[removed] 
jQuery(".class2”).click(function() {
    [removed] = “#2”;
}); 
[removed]

[removed] 
jQuery(".class3”).click(function() {
    [removed] = “#3”;
}); 
[removed]

[removed] 
jQuery(".class4”).click(function() {
    [removed] = “#4”;
}); 
[removed]

[removed] 
jQuery(".class5”).click(function() {
    [removed] = “#5”;
}); 
[removed]

Always using the object for java code: I put them all together, put individually in the row that I want to make clickable, it doesn't work. The result is always the same: only the first div becomes clickable. Even moving the object for java code away, from the first row to other rows, the result is the same. The first div is always the only clickable.

I found the solution. By importing the code written above, as corrected by you, it works. I don't know if this method is theorically correct, but it works fine. So...

In the visual composer, you have to insert an object to add the java code in each row that you want to make clickable (for example: for 5 clickable divs, you make 5 objects to insert the java code). Inside each object you have to insert the specific code for each class:

[removed]
jQuery(".class1”).click(function() {
[removed] = “#1”;
});
[removed]    
  • 0
Reply Report