javascript - Add empty image tag with jQuery -
I have a menu with the sub menu and one This means that JS is making a code of mass destruction, I can not fix it with CSS Use this code because it will affect the whole menu here by using the menu id $ ('. DaymanicPageMenu') code to get, hide and hide sub menu from this menu To fix alignment, I must add the image to li < / P> You do not need it, use CSS to align them properly. Also, for nested inventory menus, you really need the nest list element. + and
_ About sub menu: The menu in which the sub-alignment is not different, it is different from the other and to fix it, it should add an image to
li , Which does not have any image and here it means what I mean.
$ (function ( ) {//}. Representative ("img", "click", function () {var checkshumenmenfood = $ (this) .Parent (". DaymanicPageSubMenu") children; (checksquenFuf! = 0) {// This div shows fast "Children" ("day"), "child" (".", "Fasting", ceremony () {$ (this). Parent () children (" Img "). Attr ('src', 'http: // local host: 53188 / content / imag es / collectionImages / image.png'); $ (This) .remove ();})}} and {$ ( This is) .Parent () .app ("& lt; div class = 'daymanic page page menu' & gt; & lt; / div & gt;"); var subMenuDiv = $ (this) .Parent ("Children"). DaymanicPageSubMenu "); // Ajax var menuI To get the sub menu by d = $ (this), get the menu id. Type the data ('accessories'); // ajax request $ .ajax ({url: "GetSubMenu", data: {menuId: menuId}, : 'POST', async: false, success: function (data) {subMenuDiv.append (data);}}); // to show this Divi Fast submenuDiva. () Slide Down ("Fast", Function ( ) {$ (This) .Parent (.) Children ("IMG"). Attr ('src', 'http: // localhost: 53188 / content / images / collection images / image2.png');}); }}); // list indexing function $ ('list list'). Representative ('label', 'click', function () {var currentpage = $ ('. LiIndexing'). Html (); var parent = $ (this) parent (); parent parent = parent (); Remove removeClassLabel = parentParent.find ('li [name =' + currentpage + ']'); removeClassLabel.children ('label'). RemoveClass ("Lyndexing"); If ($ (this) .html ( ) == "Next") {currentpage ++; var page count = $ (this) .attr ('name');} and if ($ (this) .html () == "previous" (current page =; ( Otherwise) =) (current page = $ (this) .data ('content');} if (current page and lieutenant; 1) {currentpage = 1;} if (current page & gt; page count) {currentpage = pagecount; } // m To get a list list, type Ajax var newListdiv = $ ("# news page"); // AJAX request $. ({Url: "news", data: {listId: currentpage}, type: 'POST' Async: Incorrect, Success: Work (data) {newListdiv.empty (). Attachment (data);}}); var addClassLabel = parentParent.find ('li [name =' + currentpage + ']'); addClassLabel. ('Label'). AddClass ("liIndexing");}); $ ("# Newsletter list index: one (1)"). Children ("label"). Adclass ("linedexing"); Var tn1 = $ ('.mygallery'). Tn3 ({skinDir: "skins", imageClick: "fullscreen", image: {max zoom: 1.5, crop: true, click document: "dblclick", infection: [{type: "blinds"}, {type: "grid "}, {Type:" grid ", duration: 460, ease:" easeinquad ", gridax: 1, grid: 8, // flat, diagonal, division, random sort:" random ", sort: wrong, diagonal start : "Bl", // fade, scale method: "scale", calibration: 360, Partiazing: "Easy Autism", part direction: "left"}}}}}); });
Comments
Post a Comment