Custom Cursor in Divi

This is a little script that let’s you add a custom cursor to your website.

You can get the links to the uploaded images in your Media Library.

The following code needs to be placed in “Divi Options -> Integration -> Add code to the < body >”


    //Add the link to the image of your regular cursor below
    var cursor = "";

    //Add the link to the image that should show on hover
    var cursor_hover = "";

    //set the size of the cursor in pixel
    var cursor_width = "80";

    //set if the default cursor should still be shown "true", or if it should be hidden "false"
    var hide_real_cursor = "true";

    //if you want the image to have a delay, enter the delay in miliseconds (1000 miliseconds are 1 second)
    //chose 0 if you don't want any delay
    //if you choose a value above 0 I recommend setting the "hide_real_cursor" to "false"
    var cursor_delay = 0;
    var mouseX, mouseY;
    var img = $('<img id="mouseCursor">');
    img.attr('src', cursor);

      var currentCursor = $(this).css('cursor');
      if(currentCursor == "pointer"){
      if($(this)[0].getAttribute("customHover") == "true"){
    $(document).mousemove(function(event) {
      mouseX = event.pageX;
      mouseX = event.pageY;
      if(cursor_delay > 0){

    if(hide_real_cursor == true){