I am using an entry which depends on how to add jQuery's entry to an overlay, depending on which The image is clicked which works well. But if no image is inserted then I want to remove the containerImage img . This is the closest I got to click and remove empty tags, but I want to do it on page load.
$ (document) .ready (function () {var $ container = $ ("# container image img"); $ container.click (function () {if ($ container.ttR ("Src") === "") {$ (this) .remove ();} else {console.log ("not empty");}}};}); Here the HTML in the IMG tag is, I'm calling the images to go into the empty source
So the above example has only 2 images, I want to remove that box after leaving it with a 3 empty box and after filling the images.
Here is the code to fill images, as well as title and description
$ (document) .ready (function () {$ ('. BoxImage') Click (function () (var project = $ (this) .attr ('project'), description = $ (this) .attr ('description'), images = $ (this) .attr ('images'); $ ("Text"); $ ("projects description"). Text (description); var image array = images (such as ','); datloged (image array);}); function deferred (array) {// $ ('.gallery thumbnail'); $ thumbnail.ttr ('scom', ''); (var i = 0; i & lt; 5; i ++) {$ ('. Gallery thumbnail: eq (' + ' I '' '). Attr (' src ', array [i]);}}});
$ thumbnails.filter ("[src = '']") .remove ();
First of all, keep in mind that:
is an invalid closing tag for & lt; IMG & gt; (IMG is a self-closing tag)
Image , Description , and project are invalid HTML attributes. (Use the data - * attributes)
& lt; Img src = "" class = "Boxing Gallery Thumbnail" & gt; & Lt; Img src = "" class = "Boxing Gallery Thumbnail" & gt; & Lt; Img src = "" class = "Boxing Gallery Thumbnail" & gt; & Lt; Img src = "image / image 1.jpg" class = "box image w2" data-project = "project title" data-description = "description" data-images = "pictures / 4.jpg, pictures / 5.jpg" & Gt; Click here (function () {var data = $ (this Data (); $ ("Projects"). Text (Data Pauses); $ ("Projects Description"). Text (Data Description); Datoded (Data.immes.plit (','));} $ Var (thumbnail); $ thumbnail = $ ('gallery thumbnail'); $ thumbnail.ttr ('scom', ''); for (var i = 0; i | Now this is what I do not understand ... if you remove your images You do not have any src attribute dom ready , your script fills the reason for any image ... well, it has been removed .
Popular posts from this blog
I want to list folder names in the list. There is a file to show the folder name. There is already a problem, please do a test. Another code would be OK. & lt ;? Php function getFileList ($ folder name, $ fileType = "") {if (substr ($ folderName, strlen ($ folderName) - 1)! = "/") {$ Folder name. = '/'; } Foreach (Globe ($ folderName. '*'. $ FileType) $ filename) {if_dir ($ filename)) {$ type = 'folder'; } And {$ type = 'file'; } Echo str_replace ($ folderName, '', $ filename. ' '); }} // call function getFileList ('folder name'); // List of all files? & Gt; & Lt; Select class = "form" name = "userlevel" size = "1" & gt; & Lt; Option value = "& lt ;? php getFileList ('theme') ;? & gt;" & Gt; فولدر 1 & lt; / Options & gt; & Lt; Option value = "& lt ;? php getFileList ('theme') ;? & gt;" ...
I have many controllers in my Spring-boot (1.1.4.RELEASE) / Spring-Security application that I want However, running some integration tests, I do not know how the authentication is handled to make the request. This is my test: @ContextConfiguration (classes = OFAC, loader = SpringApplicationContextLoader) @ Transaction @WebAppConfiguration @IntegrationTest Class AdminControllerIntegrationTest Specification {def adminUrl = "http: / / / Localhost: 9001 / admin "@Autowired Personal AdminController AdminController Expands; DEF "Testing to retrieve users from DB table" () {def model = Fake (Model) RestTemplate restTemplate = New TestRestTemplate () when: DEF result = restTemplate.getForEntity (adminUrl, String.class, model) Then: Results ! = Null} This is my security configuration: @configuration @ EnableWebMvc security public class ApplicationSecurity WebSecurityConfigurerAdapter Extended {@Autowired Private CustomUserDetailsService customUserDetailsServi...
Hi, My purpose is to load the combobox with the voices from a database, the code below works fine with a problem, I already get two items, so what should I do to stop it Public Zero LoadCombs () {try {string cs = "jdbc: mysql: // localhost: 3307 / booksalvation6"; String user = "root"; String password = "latein"; JComboBox2.removeAllItems (); // Make sure the old data has been prepared; Statement pstpost; As a result rspost; ConCombos = DriverManager.getConnection (CS, User, Password); (Int i = 1; i & lt; 11; i ++) {string query pst = "select from post" + "WHERE postage_id =" + i; // Load Postage Selection pstpost = conCombos.prepareStatement (querypost); Rspost = pstpost.executeQuery (); Whereas (rspost.next ()) {string myopost = rspost.getString (6); JComboBox2.addItem (Mypost); }}} Hold (SQLException pre) {Logger.getLogger (BasicFrame.class.getName ()). Log (Level.SEVERE, null, ex); } ConCombos.close (); } Hold (SQLException p...
|
Comments
Post a Comment